-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.34 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
name: Tests
on:
push:
env:
CARGO_TERM_COLOR: always
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
server/target/
key: cargo-build-${{ hashFiles('Cargo.toml') }}
- name: Install system dependencies
run: sudo apt-get install libasound2-dev libudev-dev
- name: Run tests
run: cargo test --all-features
rustChecks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
server/target/
key: cargo-build-${{ hashFiles('Cargo.toml') }}
- name: Install system dependencies
run: sudo apt-get install libasound2-dev libudev-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
- name: rustfmt
run: cargo fmt --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -A deprecated -D warnings