Skip to content

Commit 7689e40

Browse files
committed
ci: run tests
1 parent ccd0e25 commit 7689e40

File tree

1 file changed

+51
-9
lines changed

1 file changed

+51
-9
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,62 @@
1-
name: Check Rust Format
1+
name: Rust CI
2+
23
on:
4+
push:
5+
branches:
6+
- main
37
pull_request:
48
branches:
59
- main
6-
workflow_dispatch:
710

811
jobs:
9-
format:
10-
name: Format Check
12+
check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
- name: Set up Rust
18+
uses: dtolnay/rust-toolchain@v1
19+
with:
20+
toolchain: stable
21+
- name: Run cargo check
22+
run: cargo check
23+
24+
test:
1125
runs-on: ubuntu-latest
1226
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
- name: Set up Rust
30+
uses: dtolnay/rust-toolchain@v1
31+
with:
32+
toolchain: stable
33+
- name: Install cargo-expand
34+
run: cargo install cargo-expand
35+
- name: Run cargo test
36+
run: cargo test --verbose
1537

16-
- name: Run fmt
38+
fmt:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
- name: Set up Rust
44+
uses: dtolnay/rust-toolchain@v1
45+
with:
46+
toolchain: stable
47+
components: rustfmt
48+
- name: Check code formatting
1749
run: cargo fmt -- --check
1850

19-
- name: Run clippy
20-
run: cargo clippy -- --deny warnings
51+
clippy:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v2
56+
- name: Set up Rust
57+
uses: dtolnay/rust-toolchain@v1
58+
with:
59+
toolchain: stable
60+
components: clippy
61+
- name: Run Clippy
62+
run: cargo clippy -- --deny warnings

0 commit comments

Comments
 (0)