-
Notifications
You must be signed in to change notification settings - Fork 19
64 lines (46 loc) · 1.57 KB
/
ci.yml
File metadata and controls
64 lines (46 loc) · 1.57 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
name: "Rust checks"
on:
pull_request:
branches: [ main ]
permissions:
contents: read
actions: read
jobs:
check:
# Target self-hosted runner by label
runs-on: [ nixos ]
# SECURITY: Require manual approval for external PRs
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: checkout-code
uses: actions/checkout@v4
- name: cargo-check
env:
RUSTFLAGS: "-D warnings" # Make all warnings deny.
run: nix develop --command cargo check
- name: cargo-test
env:
RUSTFLAGS: "-D warnings" # Make all warnings deny.
run: nix develop --command cargo test
# TODO: make clippy work
# - name: cargo-clippy
# env:
# RUSTFLAGS: "-D warnings" # Make all warnings deny.
# run: nix develop --command cargo clippy
- name: cargo-bench
run: nix develop --command cargo bench --no-run # Just to make sure it compiles
- name: cargo-fmt
run: nix develop --command cargo fmt --check
- name: cargo-doc
run: nix develop --command cargo doc
- name: nix-flake-check
run: nix flake check
- name: nix-deadnix
run: nix develop --command deadnix
- name: nix-statix
run: nix develop --command statix check
- name: nix-alejandra
run: nix develop --command alejandra --check .
# TODO: enable hongdown
# - name: markdown-formatting
# run: nix develop --command hongdown --check .