Replace unmaintained GitHub Actions (#131)

The toolchain is now installed with `dtolnay/rust-toolchain` and
`actions-rs/cargo` is replaced with plain commands.
This commit is contained in:
nickelc 2023-02-08 18:28:15 +01:00 committed by GitHub
parent f9d55a686c
commit e3841d6e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,11 +20,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- name: Check - name: Check
run: cargo check --all --all-features --all-targets run: cargo check --all --all-features --all-targets
@ -40,13 +36,16 @@ jobs:
RUSTFLAGS: "-D warnings" RUSTFLAGS: "-D warnings"
steps: steps:
- uses: actions-rs/toolchain@v1 - name: Checkout sources
with: uses: actions/checkout@v3
toolchain: ${{ matrix.rust }}
profile: minimal - name: Install rust toolchain
- uses: actions/checkout@v3 uses: dtolnay/rust-toolchain@master
- name: Test with:
run: cargo test --all toolchain: ${{ matrix.rust }}
- name: Test
run: cargo test --all
lints: lints:
name: Lints name: Lints
@ -56,21 +55,13 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@stable
with: with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy components: rustfmt, clippy
- name: Run cargo fmt - name: Run cargo fmt
uses: actions-rs/cargo@v1 run: cargo fmt --all --check
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy - name: Run cargo clippy
uses: actions-rs/cargo@v1 if: always()
with: run: cargo clippy --all-features -- -D warnings
command: clippy
args: --all-features -- -D warnings