-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (63 loc) · 1.62 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: test
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_call:
defaults:
run:
shell: bash
# cancel previous runs if new commits are pushed to the PR, but run for each commit on master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
test:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: cargo test
# for some reason cargo won't run unit tests against the default wasm32-wasi target
run: cargo test --target x86_64-unknown-linux-gnu
check:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: actions-rs/cargo@v1
with:
command: check
rustfmt:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-deps -- -D warnings