-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor test and clippy workflows for feature matrix
The GitHub Actions workflows for testing and linting have been refactored to use a matrix strategy. This allows us to run tests and lints against multiple feature flags in parallel, improving the efficiency of our CI/CD pipeline. The changes include removing individual steps for each feature flag and replacing them with a single step that uses the matrix feature.
- Loading branch information
1 parent
c46c8d2
commit 7e235c4
Showing
1 changed file
with
27 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,17 @@ jobs: | |
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
feature: | ||
- v1_local | ||
- v1_public | ||
- v2_local | ||
- v2_public | ||
- v3_local | ||
- v3_public | ||
- v4_local | ||
- v4_public | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
|
@@ -30,38 +41,22 @@ jobs: | |
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v1_local | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v1_public | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v2_local | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v2_public | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v3_local | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v3_public | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v4_local | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features v4_public | ||
args: --no-default-features --features ${{ matrix.feature }} | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
feature: | ||
- v1_local | ||
- v1_public | ||
- v2_local | ||
- v2_public | ||
- v3_local | ||
- v3_public | ||
- v4_local | ||
- v4_public | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
|
@@ -73,7 +68,8 @@ jobs: | |
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
args: --no-default-features --features ${{ matrix.feature }} -- -D warnings | ||
|
||
audit: | ||
name: Security Audit | ||
runs-on: ubuntu-latest | ||
|
@@ -88,3 +84,4 @@ jobs: | |
- uses: actions-rs/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- run: cargo audit |