-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 958 Bytes
/
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
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
lints:
name: Lints
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Enable magic Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Cache lint store
id: lint-store
uses: actions/cache@v3
with:
path: ~/.ci-store
key: lint-store-${{ hashFiles('**/Cargo.lock', '**/flake.lock') }}-v1
- name: Check rustfmt
run: nix develop --store ~/.ci-store --command cargo fmt --check
- name: Check nixpkgs-fmt formatting
run: nix develop --store ~/.ci-store --command nixpkgs-fmt --check .
- name: Check build
run: nix develop --store ~/.ci-store --command cargo build
- name: Check tests
run: nix develop --store ~/.ci-store --command cargo test