-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (37 loc) · 917 Bytes
/
test.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
42
43
44
45
name: Fmt, Clippy, Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_index: [clippy, fmt, test]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.81.0
override: true
components: rustfmt, clippy
- uses: actions-rs/[email protected]
with:
crate: cargo-audit
version: latest
- name: Run cargo fmt
if: ${{ matrix.node_index == 'fmt' }}
run: cargo fmt --all -- --check
- name: Run cargo clippy
if: ${{ matrix.node_index == 'clippy' }}
run: cargo clippy -- -D warnings
- name: Run cargo test
if: ${{ matrix.node_index == 'test' }}
run: cargo test