-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·59 lines (54 loc) · 1.64 KB
/
checks.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
name: Checks
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Pipewire
run: |
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt-get update
sudo apt-get install pipewire pipewire-audio-client-libraries
- name: Update to rust nightly
run: rustup update nightly && rustup default nightly
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Rustfmt
run: |
rustup component add rustfmt
cargo fmt --all -- --check
- name: Clippy
run: |
rustup component add clippy
cargo clippy --all-features
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v4
with:
send-statistics: false
- name: Install Lix
uses: DeterminateSystems/nix-installer-action@v14
with:
diagnostic-endpoint: ''
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
logger: pretty
- name: Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: ''
- name: Enter devshell
run: nix develop
- name: Check nix formatting
run: git ls-files '*.nix' | xargs nix run nixpkgs#nixfmt-rfc-style -- --check ./
- name: Scan .nix files for dead code
run: git ls-files '*.nix' | nix run nixpkgs#deadnix
- name: Check for lints and suggestions
run: nix run nixpkgs#statix -- check