Repository navigation
82 lines (69 loc) · 2.41 KB
/
Copy pathci.yml
File metadata and controls
82 lines (69 loc) · 2.41 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
NIX_CONFIG: experimental-features = nix-command flakes
jobs:
quality:
name: quality (ubuntu-latest, nix latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Install Nix
uses: DeterminateSystems/determinate-nix-action@d96678350ffd6a456235832eb11e1c491589b7bb # v3.21.8
- name: Show Nix version
run: nix --version
- name: Build nxr
id: nxr
run: |
system="$(nix eval --raw --impure --expr 'builtins.currentSystem')"
nix build ".#packages.$system.default" -L
nxr_bin="$(nix path-info ./result)/bin/nxr"
echo "bin=$nxr_bin" >> "$GITHUB_OUTPUT"
echo "Packaged nxr: $nxr_bin"
"$nxr_bin" --version
- name: Root CI graph
env:
NXR: ${{ steps.nxr.outputs.bin }}
run: |
unset NXR_DEV_SHELL || true
export GIT_CONFIG_GLOBAL=/dev/null
export GIT_CONFIG_SYSTEM=/dev/null
"$NXR" ci plan --json >/dev/null
"$NXR" task ci --dry-run
"$NXR" task ci
- name: Flake check (hermetic)
run: nix flake check -L
- name: Warm-path latency thresholds
env:
NXR_BIN: ${{ steps.nxr.outputs.bin }}
NXR_PERF_RUNS: "3"
NXR_PERF_ENFORCE: "1"
run: ./scripts/perf/measure-release.sh --enforce
- name: Fixture smoke (basic-apps)
env:
NXR: ${{ steps.nxr.outputs.bin }}
run: |
"$NXR" --flake fixtures/basic-apps hello
"$NXR" --flake fixtures/basic-apps echo-args -- a b
"$NXR" --flake fixtures/basic-apps succeed
if "$NXR" --flake fixtures/basic-apps fail; then
echo "expected fail app to exit non-zero" >&2
exit 1
fi
- name: Fixture smoke (task-dag)
env:
NXR: ${{ steps.nxr.outputs.bin }}
run: |
"$NXR" --flake fixtures/task-dag task ci --dry-run
"$NXR" --flake fixtures/task-dag task ci
- name: Fixture smoke (shell-integration)
env:
NXR: ${{ steps.nxr.outputs.bin }}
run: |
"$NXR" --flake fixtures/shell-integration doctor --json >/dev/null
nix develop ./fixtures/shell-integration --command bash -lc 'command -v nxr >/dev/null'