-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (35 loc) · 823 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: v1 # increment this to bust the cache if needed
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all