Skip to content

Commit

Permalink
Fix feature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Jul 2, 2023
1 parent 053be64 commit 1934137
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ jobs:
test-features:
name: test features
runs-on: ubuntu-latest
matrix:
std: [std, '']
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
Expand All @@ -128,7 +130,7 @@ jobs:
go install github.com/pelletier/go-toml/cmd/tomljson@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- run: ci/test_all_features.sh
- run: ci/test_all_features.sh ${{ matrix.std }}



Expand Down
8 changes: 6 additions & 2 deletions ci/test_all_features.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
set -euxo pipefail

for feature in $(tomljson Cargo.toml | jq --raw-output '.features | keys[]' | grep -v 'default\|std\|testing-helpers'); do
cargo test -p derive_more --tests --no-default-features --features "$feature,testing-helpers";
for feature in $(tomljson Cargo.toml | jq --raw-output '.features | keys[]' | grep -v 'default\|std\|full\|testing-helpers'); do
if [ "${1:-}" = 'std' ]; then
cargo test -p derive_more --tests --no-default-features --features "$feature,std,testing-helpers";
else
cargo test -p derive_more --tests --no-default-features --features "$feature,testing-helpers";
fi
done

0 comments on commit 1934137

Please sign in to comment.