@@ -28,48 +28,46 @@ jobs:
2828 - uses : actions/checkout@v4
2929
3030 - name : Install Rust
31- uses : dtolnay/rust-toolchain@master
31+ uses : dtolnay/rust-toolchain@stable
3232 with :
3333 toolchain : ${{ matrix.rust }}
3434 components : rustfmt, clippy
3535
3636 - name : Cache cargo registry
37- uses : actions/cache@v3
37+ uses : actions/cache@v4
3838 with :
3939 path : |
4040 ~/.cargo/registry
4141 ~/.cargo/git
4242 target
4343 key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4444
45- - name : Check formatting
46- run : cargo fmt --all -- --check
47- continue-on-error : true
48- id : fmt-check
49-
50- - name : Formatting feedback
51- if : steps.fmt-check.outcome == 'failure'
52- run : |
53- echo "❌ Code formatting issues detected!"
54- echo "Please run 'cargo fmt --all' to fix formatting."
55- echo "Or add this to your pre-commit hook:"
56- echo " cargo fmt --all"
57- exit 1
45+ - name : Check formatting
46+ run : cargo fmt --all -- --check
47+ continue-on-error : true
48+ id : fmt-check
49+
50+ - name : Formatting feedback
51+ if : steps.fmt-check.outcome == 'failure'
52+ run : |
53+ echo "::warning::Code formatting issues detected!"
54+ echo "Please run 'cargo fmt --all' to fix formatting."
55+ echo "Or add this to your pre-commit hook:"
56+ echo " cargo fmt --all"
5857
59- - name : Run clippy
60- run : cargo clippy --all-targets --all-features -- -D warnings
61- continue-on-error : true
62- id : clippy-check
63-
64- - name : Clippy feedback
65- if : steps.clippy-check.outcome == 'failure'
66- run : |
67- echo "❌ Clippy issues detected!"
68- echo "Please run 'cargo clippy --all-targets --all-features --fix --allow-dirty' to fix issues."
69- echo "Or add this to your development workflow:"
70- echo " cargo clippy --fix --allow-dirty"
71- echo "Or run './scripts/fix-code-quality.sh' to auto-fix both formatting and clippy issues."
72- exit 1
58+ - name : Run clippy
59+ run : cargo clippy --all-targets --all-features -- -D warnings
60+ continue-on-error : true
61+ id : clippy-check
62+
63+ - name : Clippy feedback
64+ if : steps.clippy-check.outcome == 'failure'
65+ run : |
66+ echo "::warning::Clippy issues detected!"
67+ echo "Please run 'cargo clippy --all-targets --all-features --fix --allow-dirty' to fix issues."
68+ echo "Or add this to your development workflow:"
69+ echo " cargo clippy --fix --allow-dirty"
70+ echo "Or run './scripts/fix-code-quality.sh' to auto-fix both formatting and clippy issues."
7371
7472 - name : Build
7573 run : cargo build --verbose
9391
9492 - name : Install cargo-llvm-cov
9593 uses : taiki-e/install-action@cargo-llvm-cov
96-
94+
95+ - name : Cache cargo registry
96+ uses : actions/cache@v4
97+ with :
98+ path : |
99+ ~/.cargo/registry
100+ ~/.cargo/git
101+ target
102+ key : ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
103+
97104 - name : Generate code coverage
98- run : cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
105+ run : cargo llvm-cov --all-features --lcov --output-path lcov.info
99106 - name : Upload coverage report
100107 uses : actions/upload-artifact@v4
101108 with :
0 commit comments