diff --git a/.github/workflows/feature_powerset.yml b/.github/workflows/feature_powerset.yml index 36fdbfc..ea83aa8 100644 --- a/.github/workflows/feature_powerset.yml +++ b/.github/workflows/feature_powerset.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 0a6bd5f..65cafcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" @@ -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.