-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.34 KB
/
CI.yaml
File metadata and controls
54 lines (47 loc) · 1.34 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
name: "CI"
on:
pull_request:
push:
branches: ["main"]
schedule:
# Run every Friday at 00:00 UTC
- cron: "0 0 * * 5"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-nix
- name: Cache pre-commit hooks
uses: actions/cache@v5
with:
path: ~/.cache/prek
key: prek-v1|${{ runner.os }}|${{ runner.arch }}|${{ hashFiles('**/.pre-commit-config.yaml') }}
- name: Run pre commit hooks on all files
run: prek run --all-files
nix-build-check:
needs:
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-nix
- name: Build nix package
run: nix build --profile default
# use --profile default to avoid dependencies being gc
- name: Run nix flake check
run: nix flake check --all-systems
test:
needs:
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-nix
- name: Run integration tests with coverage
run: run-cov --all --no-capture
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: github.actor != 'dependabot[bot]'