Skip to content

Commit 6f2df90

Browse files
committed
Add CI
1 parent dff9baf commit 6f2df90

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/check.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on: push
2+
3+
name: Check
4+
5+
jobs:
6+
check:
7+
name: Check
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- uses: actions/cache@v2
13+
with:
14+
path: |
15+
~/.cargo/registry
16+
~/.cargo/git
17+
target/
18+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
19+
20+
- uses: actions-rs/toolchain@v1
21+
with:
22+
profile: minimal
23+
toolchain: nightly
24+
components: rustfmt, clippy
25+
override: true
26+
27+
- name: cargo check
28+
run: |
29+
cargo check
30+
31+
- name: cargo check
32+
uses: actions-rs/cargo@v1
33+
with:
34+
command: check
35+
36+
- name: cargo fmt
37+
uses: actions-rs/cargo@v1
38+
with:
39+
command: fmt
40+
args: --check
41+
42+
- name: cargo clippy
43+
uses: actions-rs/cargo@v1
44+
with:
45+
command: clippy
46+
47+
- name: cargo build
48+
uses: actions-rs/cargo@v1
49+
with:
50+
command: build

0 commit comments

Comments
 (0)