-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
226: Fix warnings in CI r=Aadamandersson a=Aadamandersson This fixes the warnings in our CI. We are currently using [action-rs/toolchain](https://github.com/actions-rs/toolchain) to install the Rust toolchain in Github Actions. But as it seems to be unmaintained (see actions-rs/toolchain#216) and needs to be replaced to fix some of the warnings (see actions-rs/toolchain#219) I have replaced it with [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain), which looks like a suitable replacement. Co-authored-by: Adam Andersson <[email protected]>
- Loading branch information
Showing
2 changed files
with
25 additions
and
67 deletions.
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
status = [ | ||
"Check (nightly)", | ||
"Test (nightly)", | ||
"Check", | ||
"Test", | ||
"Rustfmt", | ||
"Clippy (nightly)", | ||
"Deploy (nightly)", | ||
"Clippy", | ||
"Deploy", | ||
"Typos" | ||
] | ||
delete_merged_branches = true |
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 |
---|---|---|
|
@@ -12,102 +12,60 @@ jobs: | |
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- nightly | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- uses: actions-rs/[email protected] | ||
with: | ||
command: check | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo check | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- nightly | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo test | ||
|
||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- nightly | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- uses: actions-rs/[email protected] | ||
with: | ||
command: xtask | ||
args: deploy --check | ||
- run: cargo xtask deploy --check | ||
|
||
rustfmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions-rs/toolchain@v1.0.7 | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: rustfmt | ||
override: true | ||
- uses: actions-rs/[email protected] | ||
with: | ||
command: fmt | ||
args: --check | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo fmt --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions-rs/toolchain@v1.0.7 | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
components: clippy | ||
override: true | ||
- uses: actions-rs/[email protected] | ||
with: | ||
command: clippy | ||
args: -- -Dwarnings | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo clippy -- -Dwarnings | ||
|
||
typos: | ||
name: Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions/checkout@v3 | ||
- uses: crate-ci/[email protected] | ||
with: | ||
config: ./.typos.toml |