Skip to content

Commit 2e0c5b3

Browse files
authored
Merge pull request #35 from rursprung/add-check-and-clippy-to-CI
CI: add check+clippy+audit
2 parents 48ac935 + 6c18be7 commit 2e0c5b3

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,39 @@ jobs:
2828
run: |
2929
rustup update ${{ matrix.toolchain }}
3030
rustup default ${{ matrix.toolchain }}
31-
rustup component add rustfmt
31+
rustup component add rustfmt clippy
32+
- name: install cargo-binstall
33+
uses: cargo-bins/cargo-binstall@main
34+
- name: Install required cargo tools
35+
run: cargo binstall -y cargo-audit
3236

3337
- name: Check format
3438
run: cargo fmt --check
3539

40+
- name: Validate code
41+
run: cargo check
42+
3643
- name: Test code
3744
run: cargo test --verbose
45+
46+
- name: Run clippy
47+
if: ${{ matrix.toolchain == 'stable' }}
48+
run: cargo clippy
49+
50+
- name: Run audit
51+
run: cargo audit
52+
53+
# simplify GH settings: have one single build to be required
54+
build-results:
55+
name: Final Results
56+
if: ${{ always() }}
57+
runs-on: ubuntu-latest
58+
needs:
59+
- build_and_test
60+
steps:
61+
- name: check for failed builds
62+
run: |
63+
cat <<EOF | jq -e 'unique | all(. == "success")'
64+
${{ toJson(needs.*.result) }}
65+
EOF
66+

0 commit comments

Comments
 (0)