Skip to content

Commit

Permalink
Update cargo checks
Browse files Browse the repository at this point in the history
  • Loading branch information
spencewenski committed Mar 29, 2024
1 parent 95be0be commit a321367
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
16 changes: 10 additions & 6 deletions .cargo-husky/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
#!/usr/bin/env bash

# Checks that don't depend on which features are enabled
echo "### fmt --all -- --check ###"
cargo fmt --all -- --check
echo "### clippy --workspace -- -D warnings ###"
cargo clippy --workspace -- -D warnings
# `fmt` doesn't depend on which features are enabled
echo "### fmt --all --check ###"
cargo fmt --all --check

# Without default features
# With no features
echo "### test --no-default-features --workspace ###"
cargo test --no-default-features --workspace
echo "### check --no-default-features --workspace ###"
cargo check --no-default-features --workspace
echo "### clippy --workspace --all-targets --no-default-features -- -D warnings ###"
cargo clippy --workspace --all-targets --no-default-features -- -D warnings

# With default features
echo "### test --workspace ###"
cargo test --workspace
echo "### check --workspace ###"
cargo check --workspace
echo "### clippy --workspace --all-targets -- -D warnings ###"
cargo clippy --workspace --all-targets -- -D warnings

# With all features
echo "### test --all-features --workspace ###"
cargo test --all-features --workspace
echo "### check --all-features --workspace ###"
cargo check --all-features --workspace
echo "### clippy --workspace --all-targets --all-features -- -D warnings ###"
cargo clippy --workspace --all-targets --all-features -- -D warnings
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
run: cargo test --no-fail-fast --no-default-features --workspace
- name: Check
run: cargo check --no-default-features --workspace
- name: Clippy
run: cargo clippy --workspace --all-targets --no-default-features -- -D warnings

roadster_default_features:
name: Default features
Expand All @@ -29,6 +31,8 @@ jobs:
run: cargo test --no-fail-fast --workspace
- name: Check
run: cargo check --workspace
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings

roadster_all_features:
name: All features
Expand All @@ -39,6 +43,8 @@ jobs:
run: cargo test --no-fail-fast --all-features --workspace
- name: Check
run: cargo check --all-features --workspace
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

roadster_with_all_feature_combinations:
name: Feature combos
Expand All @@ -58,7 +64,9 @@ jobs:
- name: Test
run: cargo test --no-fail-fast --no-default-features --features ${{matrix.features}} --workspace
- name: Check
run: cargo check --no-default-features --features ${{matrix.features}} --workspace
run: cargo check --no-default-features --workspace
- name: Clippy
run: cargo clippy --workspace --all-targets --features ${{matrix.features}} -- -D warnings

clippy:
name: Clippy
Expand All @@ -74,4 +82,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Formatting
run: cargo fmt --all -- --check
run: cargo fmt --all --check

0 comments on commit a321367

Please sign in to comment.