Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
spencewenski committed Oct 19, 2024
1 parent 58755a6 commit 1ca48fc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 63 deletions.
110 changes: 48 additions & 62 deletions .github/workflows/feature_powerset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,69 +85,55 @@ jobs:
for feature_list in "${features[@]}"; do
echo "::group::cargo nextest run --no-fail-fast --features $feature_list"
cargo nextest run --no-fail-fast --features "$feature_list"
echo "::endgroup::"
echo "::group::cargo test --doc --no-fail-fast --features $feature_list"
cargo test --doc --no-fail-fast --features "$feature_list"
cargo clean -p roadster
echo "::endgroup::"
done
powerset_check:
name: Powerset Check
needs: generate_powerset
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
index: ${{ fromJson(needs.generate_powerset.outputs.data).indexes }}
env:
features: ${{ join(fromJson(needs.generate_powerset.outputs.data).powersets[ matrix.index ], ' ') }}
steps:
- uses: actions/checkout@v4
- uses: rui314/setup-mold@v1
- name: Test
run: |
features=($features)
for feature_list in "${features[@]}"; do
echo "::group::cargo check --features $feature_list"
cargo check --features "$feature_list"
cargo clean -p roadster
echo "::endgroup::"
done
# powerset_test:
# name: Powerset Tests
# needs: check_trigger
# if: ${{ needs.check_trigger.outputs.should_run1 == 'true' || needs.check_trigger.outputs.should_run2 == 'true' || github.event_name == 'workflow_dispatch' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: rui314/setup-mold@v1
# - uses: Swatinem/rust-cache@v2
# - uses: taiki-e/install-action@cargo-hack
# - uses: taiki-e/install-action@nextest
# # protoc is needed to build examples that have grpc enabled
# - uses: taiki-e/install-action@protoc
# - name: Test
# run: cargo hack nextest run --no-fail-fast --feature-powerset --depth 3 --skip default --group-features jwt-ietf,jwt --group-features jwt-openid,jwt --group-features open-api,http --group-features email-smtp,email --group-features email-sendgrid,email --clean-per-run --log-group github-actions --exclude-no-default-features --exclude-all-features
# - name: Check disk usage
# run: df -h
#
# powerset_doc_test:
# name: Powerset Doc tests
# needs: check_trigger
# if: ${{ needs.check_trigger.outputs.should_run1 == 'true' || needs.check_trigger.outputs.should_run2 == 'true' || github.event_name == 'workflow_dispatch' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: rui314/setup-mold@v1
# - uses: Swatinem/rust-cache@v2
# - uses: taiki-e/install-action@cargo-hack
# # protoc is needed to build examples that have grpc enabled
# - uses: taiki-e/install-action@protoc
# - name: Doc test
# run: cargo hack test --doc --no-fail-fast --feature-powerset --depth 3 --skip default --group-features jwt-ietf,jwt --group-features jwt-openid,jwt --group-features open-api,http --group-features email-smtp,email --group-features email-sendgrid,email --clean-per-run --log-group github-actions --exclude-no-default-features --exclude-all-features
#
# powerset_check:
# name: Powerset Check
# needs: check_trigger
# if: ${{ needs.check_trigger.outputs.should_run1 == 'true' || needs.check_trigger.outputs.should_run2 == 'true' || github.event_name == 'workflow_dispatch' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: rui314/setup-mold@v1
# - uses: Swatinem/rust-cache@v2
# - uses: taiki-e/install-action@cargo-hack
# # protoc is needed to build examples that have grpc enabled
# - uses: taiki-e/install-action@protoc
# - name: Check
# run: cargo hack check --feature-powerset --depth 3 --no-dev-deps --skip default --group-features jwt-ietf,jwt --group-features jwt-openid,jwt --group-features open-api,http --group-features email-smtp,email --group-features email-sendgrid,email --clean-per-run --log-group github-actions --exclude-no-default-features --exclude-all-features
#
# powerset_clippy:
# name: Powerset Clippy
# needs: check_trigger
# if: ${{ needs.check_trigger.outputs.should_run1 == 'true' || needs.check_trigger.outputs.should_run2 == 'true' || github.event_name == 'workflow_dispatch' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: rui314/setup-mold@v1
# - uses: Swatinem/rust-cache@v2
# - uses: taiki-e/install-action@cargo-hack
# # protoc is needed to build examples that have grpc enabled
# - uses: taiki-e/install-action@protoc
# - name: Clippy
# run: cargo hack clippy --all-targets --feature-powerset --depth 3 --skip default --group-features jwt-ietf,jwt --group-features jwt-openid,jwt --group-features open-api,http --group-features email-smtp,email --group-features email-sendgrid,email --clean-per-run --log-group github-actions --exclude-no-default-features --exclude-all-features -- -D warnings
powerset_clippy:
name: Powerset Clippy
needs: generate_powerset
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
index: ${{ fromJson(needs.generate_powerset.outputs.data).indexes }}
env:
features: ${{ join(fromJson(needs.generate_powerset.outputs.data).powersets[ matrix.index ], ' ') }}
steps:
- uses: actions/checkout@v4
- uses: rui314/setup-mold@v1
- name: Test
run: |
features=($features)
for feature_list in "${features[@]}"; do
echo "::group::cargo clippy --features $feature_list"
cargo clippy --features "$feature_list"
cargo clean -p roadster
echo "::endgroup::"
done
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const_format = "0.2.30"
typed-builder = { workspace = true }
num-traits = "0.2.14"
validator = { version = "0.18.0", features = ["derive"] }
thiserror = "1.0.38"
thiserror = { workspace = true }
# Add latest version of `time` to resolve a build error on nightly
# https://github.com/time-rs/time/issues/681
time = "0.3.36"
Expand Down Expand Up @@ -191,6 +191,7 @@ itertools = "0.13.0"
cargo-manifest = "0.15.0"
typed-builder = "0.20.0"
rand = "0.8.5"
thiserror = "1.0.49"

[package.metadata.docs.rs]
# Have docs.rs pass `--all-features` to ensure all features have their documentation built.
Expand Down

0 comments on commit 1ca48fc

Please sign in to comment.