Repository navigation
80 lines (72 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
80 lines (72 loc) · 2.71 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
name: CI
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions: {}
jobs:
gate:
uses: ./.github/workflows/rust-gate.yml
permissions:
contents: read
npm:
uses: ./.github/workflows/js-gate.yml
permissions:
contents: read
packaging:
uses: ./.github/workflows/platform.yml
with:
mode: rehearsal
permissions:
contents: read
checks:
name: actionlint + version surfaces
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23
with:
extra-conf: |
access-tokens = github.com=${{ github.token }}
- name: Lint GitHub Actions workflows (actionlint from the locked nixpkgs)
run: nix shell --inputs-from . nixpkgs#actionlint -c actionlint -color
- name: Version surfaces agree (release.jsonc, checked by the locked release toolchain)
if: ${{ !cancelled() }}
run: nix shell --inputs-from . pnpm-release-management#release-tools -c version-management sync check
mutation:
uses: ./.github/workflows/mutation.yml
permissions:
contents: read
nix:
name: nix flake check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23
with:
extra-conf: |
access-tokens = github.com=${{ github.token }}
- name: Flake evaluates
run: nix flake check
- name: Attribute resolves
run: nix eval .#packages.x86_64-linux.comment-checker-bwrap
- name: Build the source-built binary
# nix flake check and nix eval only evaluate; the derivation must be
# built or a broken src filter / compile failure ships green (the
# eval-only gate is precisely how a dropped Cargo.toml slipped past).
run: nix build --no-link .#packages.x86_64-linux.comment-checker-bwrap
- name: Build the release tarballs
run: nix build --no-link .#workspace-tarballs
- name: Smoke the built binary version
# Smoke the unwrapped binary: the bwrap wrapper needs --unshare-net,
# which GitHub Actions containers do not permit.
run: |
want="claude-code-comment-checker $(jq -r .version package.json)"
out="$(nix shell .#comment-checker -c comment-checker --version)"
[ "$out" = "$want" ] \
|| { echo "nix-built binary reports '$out', expected '$want'" >&2; exit 1; }