-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (53 loc) · 1.5 KB
/
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
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
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
check-systems:
name: Check runix ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
max-jobs = auto
cores = 0
substitute = true
builders-use-substitutes = true
fallback = true
connect-timeout = 5
stalled-download-timeout = 90
timeout = 0
- name: check clippy
run: nix develop '.#rust-env' -c cargo clippy
- name: check format
run: nix develop '.#rust-env' -c cargo fmt --check
- name: run tests
run: nix develop '.#rust-env' -c cargo test
check:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Check runix
needs: check-systems
steps:
- if: >-
${{
contains( needs.*.result, 'failure' ) ||
contains( needs.*.result, 'cancelled' )
}}
run: exit 1