@@ -20,6 +20,7 @@ permissions:
2020
2121env :
2222 CARGO_TERM_COLOR : always
23+ CARGO_FEATURES : --all-features
2324 # Use docker.io for Docker Hub if empty
2425 REGISTRY : ghcr.io
2526 # github.repository as <account>/<repo>
4445 changes :
4546 name : Detect changes
4647 runs-on : ubuntu-latest
48+ permissions :
49+ contents : read
50+ pull-requests : read
4751 outputs :
4852 code : ${{ steps.filter.outputs.code }}
4953 steps :
6266 calculate-version :
6367 name : Calculate version
6468 runs-on : ubuntu-latest
69+ permissions :
70+ contents : read
6571 needs :
6672 - changes
6773 - repo-has-container
@@ -201,7 +207,7 @@ jobs:
201207 - name : Build
202208 shell : bash
203209 run : |
204- cargo build --all-features --all-targets --locked --workspace --verbose
210+ cargo build ${{ env.CARGO_FEATURES }} --all-targets --locked --workspace --verbose
205211
206212 cargo-fmt :
207213 name : Cargo fmt
@@ -344,7 +350,7 @@ jobs:
344350 # build-* ones are not parsed by grcov
345351 LLVM_PROFILE_FILE : " profiling/build-%p-%m.profraw"
346352 run : |
347- cargo build --all-features --all-targets --locked --workspace --verbose
353+ cargo build ${{ env.CARGO_FEATURES }} --all-targets --locked --workspace --verbose
348354
349355 - name : Run nextest
350356 shell : bash
@@ -353,7 +359,7 @@ jobs:
353359 RUSTFLAGS : " ${{ env.RUSTFLAGS }} --allow=warnings -Cinstrument-coverage"
354360 LLVM_PROFILE_FILE : " profiling/profile-%p-%m.profraw"
355361 run : |
356- cargo nextest run --profile ci --no-fail-fast --all-targets --all-features --workspace
362+ cargo nextest run --profile ci --no-fail-fast ${{ env.CARGO_FEATURES }} --all-targets --workspace
357363 continue-on-error : true
358364
359365 - name : Upload test results
@@ -456,7 +462,7 @@ jobs:
456462 - name : Run Clippy for GitHub Actions report
457463 uses : actions-rs-plus/clippy-check@fe8905c5766416f0593a503a2230a7c83141a8f0 # v2.3.0
458464 with :
459- args : --all-features --all-targets --locked --workspace --verbose
465+ args : ${{ env.CARGO_FEATURES }} --all-targets --locked --workspace --verbose
460466
461467 docker-build :
462468 name : Build Docker container on ${{ matrix.runs-on }} for ${{ matrix.platform }}
@@ -477,6 +483,7 @@ jobs:
477483 unique_tag : ${{ steps.variables.outputs.unique_tag }}
478484 runs-on : ${{ matrix.runs-on }}
479485 permissions :
486+ contents : read
480487 packages : write
481488 needs :
482489 - calculate-version
0 commit comments