Skip to content

Commit

Permalink
ci: Update actions.
Browse files Browse the repository at this point in the history
Use `actions/checkout@v3` to remove a warning about old versions
of node.

Use `dtolay/rust-toolchain` instead of `actions-rs/toolchain` as
it is maintained (and `actions-rs` actions are not). This also
resolves a number of warnings about deprecated functionality
within the GitHub Actions UI.

Update one usage of `Swatimem/rust-cache` to v2. The other
already was updated.

Use `cargo` directly instead of using `actions-rs/cargo` as that
action is also unmaintained.
  • Loading branch information
waywardmonkeys committed Aug 9, 2023
1 parent cc986f1 commit e784c4b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
61 changes: 18 additions & 43 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,38 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
name: Setup rust toolchain
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
name: Load dependencies from cache

- uses: actions-rs/cargo@v1
name: Build with stable features
with:
command: build
args: --features stable
- name: Build with stable features
run: cargo build --features stable

- uses: actions-rs/cargo@v1
- name: Build with unstable features
if: ${{ matrix.rust == 'nightly' }}
name: Build with unstable features
with:
command: build
args: --all-features
run: cargo build --all-features

- uses: actions-rs/cargo@v1
name: Build with minimal features
with:
command: build
args: --no-default-features
- name: Build with minimal features
run: cargo build --no-default-features

- uses: actions-rs/cargo@v1
name: Test with stable features
with:
command: test
args: --features stable
- name: Test with stable features
run: cargo test --features stable

- uses: actions-rs/cargo@v1
name: Test with minimal features
with:
command: test
args: --no-default-features
- name: Test with minimal features
run: cargo test --no-default-features

- uses: actions-rs/cargo@v1
name: Check for non-standard formatting
- name: Check for non-standard formatting
if: ${{ matrix.rust == 'stable' }}
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- uses: actions-rs/cargo@v1
name: Check for clippy hints
- name: Check for clippy hints
if: ${{ matrix.rust == 'stable' }}
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings

- name: Test run targeting WASI
run: |
Expand All @@ -97,16 +74,14 @@ jobs:
- stable

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- uses: taiki-e/install-action@nextest

Expand Down

0 comments on commit e784c4b

Please sign in to comment.