Skip to content

Commit

Permalink
Explicitly test either whole workspace or a single crate on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Oct 26, 2022
1 parent 562d509 commit 9eacb0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
toolchain: stable
components: clippy

- run: cargo clippy --all-features -- -D warnings
- run: cargo clippy --workspace --all-features -- -D warnings

rustfmt:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Install minimal dependencies versions
run: cargo +nightly update -Z minimal-versions

- run: cargo test --features testing-helpers
- run: cargo test --workspace --features testing-helpers

test:
strategy:
Expand All @@ -94,7 +94,7 @@ jobs:
toolchain: ${{ matrix.toolchain }}
- run: rustup default ${{ matrix.toolchain }}

- run: cargo test --features testing-helpers
- run: cargo test --workspace --features testing-helpers

test-features:
name: test features
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
with:
toolchain: nightly

- run: cargo +nightly doc
- run: cargo +nightly doc --workspace
env:
RUSTDOCFLAGS: --cfg docsrs

Expand Down
2 changes: 1 addition & 1 deletion ci/test_all_features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -euxo pipefail

for feature in $(tomljson Cargo.toml | jq --raw-output '.features | keys[]' | grep -v 'default\|testing-helpers'); do
cargo test --tests --no-default-features --features "$feature,testing-helpers";
cargo test -p derive_more --tests --no-default-features --features "$feature,testing-helpers";
done

0 comments on commit 9eacb0a

Please sign in to comment.