Skip to content

Commit

Permalink
Run fast clippy/fmt/typos before relatively slow tests (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog authored Jan 12, 2025
2 parents 50889d9 + 63c2515 commit a154cc7
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ jobs:
rustc --version
- name: Build
run: cargo build --all-targets
- uses: taiki-e/install-action@v2
name: Install nextest using install-action
with:
tool: nextest
- name: Test
run: cargo test --workspace
- name: Check rustfmt
run: cargo fmt --all --check
- name: Check clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check typos
uses: crate-ci/typos@master
- uses: taiki-e/install-action@v2
name: Install nextest using install-action
with:
tool: nextest
- name: Test
run: cargo test --workspace
- name: Build release binary
run: cargo build --release
- name: Upload binary artifact
Expand Down Expand Up @@ -87,23 +87,21 @@ jobs:
cargo --version
rustc --version
- uses: Swatinem/rust-cache@v2
- name: rustfmt
run: cargo fmt --all -- --check
- uses: taiki-e/install-action@v2
name: Install nextest using install-action
with:
tool: nextest
- name: Build
run: cargo build --all-targets
- name: Test
run: cargo test --workspace
- name: Check rustfmt
run: cargo fmt --all --check
- name: Check clippy
if: matrix.version == 'stable'
# Clippy checks can vary between versions in a way that makes it a bit
# fiddly to satisfy them all, so only insist that they pass on stable.
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --all-targets
- uses: taiki-e/install-action@v2
name: Install nextest using install-action
with:
tool: nextest
- name: Test
run: cargo test --workspace
- run: cargo update
- name: Test after cargo update
run: cargo test --workspace
Expand Down

0 comments on commit a154cc7

Please sign in to comment.