Skip to content

Commit

Permalink
ci: ensure tests compile across all feature combinations
Browse files Browse the repository at this point in the history
Currently, when checking feature combinations on CI, we only check that
the _main_ crate code compiles. This means that the CI build will not
fail if tests don't compile with a given feature combination. This is
why issue #632 wasn't caught earlier; see [here][1] for details.

This commit changes the `cargo check` command to `cargo check --tests
--benches`.

[1]: #632 (comment)

Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw committed Mar 12, 2020
1 parent 83886fc commit a7aec08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- run: echo "::add-path::${{ runner.tool_cache }}/cargo-hack/bin"
- name: cargo hack check
working-directory: ${{ matrix.subcrate }}
run: cargo hack check --feature-powerset --no-dev-deps
run: cargo hack check --feature-powerset --no-dev-deps --tests --benches

cargo-check-tracing:
runs-on: ubuntu-latest
Expand All @@ -106,7 +106,7 @@ jobs:
profile: minimal
- name: cargo check
working-directory: tracing
run: cargo check --no-default-features --features "${{ matrix.featureset }}"
run: cargo check --no-default-features --features "${{ matrix.featureset }}" --tests --benches

cargo-check-subscriber:
runs-on: ubuntu-latest
Expand All @@ -130,7 +130,7 @@ jobs:
profile: minimal
- name: cargo check
working-directory: tracing-subscriber
run: cargo check --no-default-features --features "${{ matrix.featureset }}"
run: cargo check --no-default-features --features "${{ matrix.featureset }}" --tests --benches

test-versions:
# Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
Expand Down

0 comments on commit a7aec08

Please sign in to comment.