Skip to content

Commit c22736d

Browse files
committed
ci: add jobs build-test, fmt-clippy
1 parent 95e840d commit c22736d

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

.github/workflows/rust.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
1-
name: Rust
1+
name: CI
22

33
on:
44
push:
55
branches: [ "master" ]
66
pull_request:
77

88
env:
9-
CARGO_TERM_COLOR: auto
9+
CARGO_TERM_COLOR: always
1010

1111
jobs:
12-
build:
12+
build-test:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
rust:
17+
- toolchain: stable
18+
# - toolchain: 1.63.0
1419
steps:
15-
- uses: actions/checkout@v4
16-
- name: Build
17-
run: cargo build --verbose
18-
# - name: Run tests
19-
# run: cargo test --verbose
20+
- uses: actions/checkout@v4
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@v1
23+
with:
24+
toolchain: ${{ matrix.rust.toolchain }}
25+
- name: Test
26+
run: cargo test --no-fail-fast --all-features
27+
28+
fmt-clippy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Install Rust
33+
uses: dtolnay/rust-toolchain@v1
34+
with:
35+
components: clippy, rustfmt
36+
- name: Rust fmt
37+
run: cargo fmt --all -- --check
38+
- name: Clippy
39+
run: cargo clippy --all-targets --all-features -- -Dwarnings

0 commit comments

Comments
 (0)