Skip to content

Commit fbaaed7

Browse files
committed
update CI to check code formatting and run tests
1 parent 7e4ad3f commit fbaaed7

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,28 @@ 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+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
22+
source ~/.cargo/env
23+
rustup component add rustfmt clippy
24+
25+
- name: Add Rust to PATH
26+
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
27+
28+
- name: Check formatting
29+
run: cargo fmt --check
30+
31+
- name: Lint with Clippy
32+
run: cargo clippy --all-targets --all-features -- -D warnings
33+
1934
- name: Build
2035
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
36+
37+
- name: Run tests with all features
38+
run: cargo test --all-features --verbose

0 commit comments

Comments
 (0)