Skip to content

Commit 4642524

Browse files
committed
update CI to check code formatting and run tests
1 parent dbbc94c commit 4642524

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/rust.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,27 @@ env:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
steps:
1817
- uses: actions/checkout@v4
18+
19+
- name: Install Rust toolchain manually
20+
run: |
21+
sudo apt update && sudo apt install rustc
22+
rustup component add rustfmt clippy
23+
24+
- name: Add Rust to PATH
25+
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
26+
27+
- name: Check formatting
28+
run: cargo fmt --check
29+
30+
- name: Lint with Clippy
31+
run: cargo clippy --all-targets --all-features -- -D warnings
32+
1933
- name: Build
2034
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
35+
36+
- name: Run tests with all features
37+
run: cargo test --all-features --verbose

0 commit comments

Comments
 (0)