-
-
Notifications
You must be signed in to change notification settings - Fork 10
108 lines (102 loc) · 3.05 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Run tests and linters
on:
pull_request:
branches:
- main
paths-ignore:
- "**.md"
push:
branches:
- main
paths-ignore:
- "**/README.md"
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
format:
name: Run cargo fmt
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
clippy:
name: Run cargo clippy
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential librust-atk-sys-dev libgtk-3-dev \
gcc-multilib libpq-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libasound2-dev portaudio19-dev libpulse-dev libdbus-1-dev libudev-dev protobuf-compiler
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-deps --all-targets
test:
name: Run cargo nextest
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
NEXTEST_FAILURE_OUTPUT: final
NEXTEST_SUCCESS_OUTPUT: never
NEXTEST_STATUS_LEVEL: fail
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential librust-atk-sys-dev libgtk-3-dev \
gcc-multilib libpq-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libasound2-dev portaudio19-dev libpulse-dev libdbus-1-dev libudev-dev protobuf-compiler
- uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --fail-fast
doc:
name: Run cargo doc
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential librust-atk-sys-dev libgtk-3-dev \
gcc-multilib libpq-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libasound2-dev portaudio19-dev libpulse-dev libdbus-1-dev libudev-dev protobuf-compiler
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps --document-private-items