-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (29 loc) · 916 Bytes
/
build.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:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@main
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Set up nix dev env
run: nix develop --command echo 0
- name: Run `cargo build`
run: nix develop --ignore-environment --command cargo build
- name: Run `cargo clippy`
run: nix develop --ignore-environment --command cargo clippy --all-targets -- -D warnings
- name: Run `cargo test`
run: nix develop --command cargo test
- name: Run `cargo fmt`
run: nix develop --ignore-environment --command cargo fmt --check
- name: Run `nix fmt`
run: nix fmt -- --check .