Skip to content

Commit

Permalink
Merge #226
Browse files Browse the repository at this point in the history
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 <adam.m.andersson@gmail.com>
  • Loading branch information
bors[bot] and Aadamandersson authored May 14, 2023
2 parents 22da3d6 + 500047a commit f44b03e
Showing 1 changed file with 21 additions and 63 deletions.
84 changes: 21 additions & 63 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,102 +12,60 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
steps:
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1.0.3
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/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1.0.3
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/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
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/cargo@v1.0.3
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/cargo@v1.0.3
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/cargo@v1.0.3
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/typos@v1.0.4
with:
config: ./.typos.toml

0 comments on commit f44b03e

Please sign in to comment.