-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Fix potential template injection issues
- Loading branch information
Showing
4 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,9 @@ jobs: | |
run: > | ||
cargo test | ||
--workspace | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
|
@@ -113,7 +115,9 @@ jobs: | |
run: > | ||
cargo test | ||
--workspace | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
|
@@ -164,9 +168,11 @@ jobs: | |
run: > | ||
cargo test | ||
--workspace | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
--features expensive-tests | ||
-- --ignored | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
|
@@ -221,7 +227,9 @@ jobs: | |
--release | ||
--workspace | ||
--tests | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
|
@@ -248,16 +256,20 @@ jobs: | |
key: ${{ runner.os }}-cargo-latest | ||
- uses: dtolnay/rust-toolchain@stable | ||
id: toolchain | ||
- run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- run: rustup override set "$TOOLCHAIN" | ||
env: | ||
TOOLCHAIN: ${{steps.toolchain.outputs.name}} | ||
- name: Remove lockfile to build with latest dependencies | ||
run: rm Cargo.lock | ||
- name: Build crates | ||
run: > | ||
cargo build | ||
--workspace | ||
--all-targets | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
--verbose | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Verify working directory is clean (excluding lockfile) | ||
run: git diff --exit-code ':!Cargo.lock' | ||
|
||
|
@@ -366,10 +378,12 @@ jobs: | |
name: Clippy (MSRV) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: > | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
--all-targets | ||
-- | ||
-D warnings | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
|
||
clippy-beta: | ||
name: Clippy (beta) | ||
|
@@ -383,18 +397,22 @@ jobs: | |
uses: ./.github/actions/prepare | ||
- uses: dtolnay/rust-toolchain@beta | ||
id: toolchain | ||
- run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- run: rustup override set "$TOOLCHAIN" | ||
env: | ||
TOOLCHAIN: ${{steps.toolchain.outputs.name}} | ||
- name: Run Clippy (beta) | ||
uses: actions-rs/clippy-check@v1 | ||
continue-on-error: true | ||
with: | ||
name: Clippy (beta) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: > | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
--all-targets | ||
-- | ||
-W clippy::all | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
|
||
codecov: | ||
name: Code coverage | ||
|
@@ -422,10 +440,12 @@ jobs: | |
run: > | ||
cargo tarpaulin | ||
--engine llvm | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
--release | ||
--timeout 600 | ||
--out xml | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
@@ -446,8 +466,10 @@ jobs: | |
run: > | ||
cargo doc | ||
--all | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
--document-private-items | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
|
||
fmt: | ||
name: Rustfmt | ||
|
@@ -479,7 +501,9 @@ jobs: | |
run: > | ||
cargo check | ||
--workspace | ||
${{ steps.prepare.outputs.feature-flags }} | ||
$FEATURE_FLAGS | ||
env: | ||
FEATURE_FLAGS: ${{ steps.prepare.outputs.feature-flags }} | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
|
@@ -535,4 +559,6 @@ jobs: | |
steps: | ||
- name: Determine whether all required-pass steps succeeded | ||
run: | | ||
echo '${{ toJSON(needs) }}' | jq -e '[ .[] | .result == "success" ] | all' | ||
echo "$NEEDS" | jq -e '[ .[] | .result == "success" ] | all' | ||
env: | ||
NEEDS: ${{ toJSON(needs) }} |