forked from cloudhead/popol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds automatic checks for each PR: * `cargo clippy` * `cargo fmt` (checks that `cargo fmt` is a no-op) * [`cargo msrv`] (verifies that minimum supported Rust version is what is set as `rust-version` in Cargo.toml) * `cargo test` This also sets GitHub’s dependabot to check for updates to the GitHub actions used monthly. Currently, the crate works on any version of Rust from 1.56 on up. This sets `rust-version` in Cargo.toml so that any change to the minimum supported Rust version (MSRV) will be noticed. Finally, this removes the rust-toolchain file and adds it to .gitignore. This allows the crate to be developed on any version of Rust ≥1.56. Fixes: cloudhead#17 — Set up continious integration [`cargo msrv`]: https://github.com/foresterre/cargo-msrv
- Loading branch information
1 parent
77d3926
commit b899aa3
Showing
5 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: PR checks | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- $default-branch | ||
pull_request: | ||
|
||
jobs: | ||
clippy: | ||
name: cargo clippy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy | ||
- run: cargo clippy --all-features --all-targets | ||
|
||
fmt: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- uses: actions-rust-lang/rustfmt@v1 | ||
|
||
msrv: | ||
name: cargo msrv | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-msrv | ||
- run: cargo msrv verify | ||
|
||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- run: cargo build --tests | ||
- run: cargo test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/target | ||
Cargo.lock | ||
/rust-toolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ version = "3.0.0" | |
authors = ["Alexis Sellier <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT" | ||
rust-version = "1.56" | ||
|
||
[dependencies] | ||
libc = "0.2.134" |
This file was deleted.
Oops, something went wrong.