-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (53 loc) · 1.39 KB
/
ci.yml
File metadata and controls
67 lines (53 loc) · 1.39 KB
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
permissions:
checks: write
contents: read
jobs:
test:
name: Test
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libasound2-dev \
libudev-dev \
libwayland-dev \
libxkbcommon-dev \
libxrandr-dev \
libx11-dev \
libxi-dev \
libxinerama-dev \
libxcursor-dev \
libgl1-mesa-dev \
pkg-config
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "ci-test"
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Install tokei
run: cargo install tokei
- name: Check formatting
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Lint checks
run: bash tokei_check.sh
- name: Build
run: cargo build --all-targets
- name: Run tests
run: cargo nextest run --verbose --no-tests=pass