-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (59 loc) · 2.34 KB
/
Copy pathci.yml
File metadata and controls
66 lines (59 loc) · 2.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
55
56
57
58
59
60
61
62
63
64
65
66
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: shellcheck
run: shellcheck install.sh uninstall.sh make-portable.sh codegraph-session-check.sh tests/smoke.sh
- name: parse (bash -n)
run: |
for f in install.sh uninstall.sh make-portable.sh codegraph-session-check.sh tests/smoke.sh; do
bash -n "$f"
done
- name: smoke tests
run: bash tests/smoke.sh
- name: bundle drift gate (agent-primer.sh must equal make-portable.sh output)
run: |
./make-portable.sh
git diff --exit-code -- agent-primer.sh \
|| { echo "::error::agent-primer.sh is stale — run ./make-portable.sh and commit"; exit 1; }
# primer (TS/Node) — cross-Node + cross-OS (the npm kit is the Windows-native path,
# so Windows runs the full suite). Floor is Node 24: node:sqlite ships the FTS5
# module from v24 (older Node lacks it), and node:sqlite needs no flag on 24+.
primer:
name: primer (node ${{ matrix.node }} / ${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['24', 'latest']
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: primer
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- name: test
run: npm test
- name: launcher prints version (smoke)
run: node dist/bin/primer.js --version
- name: pack ships the bundled kit (install.sh + policy docs)
# `primer setup` runs the bundled kit; assert the tarball actually carries it so we
# never publish a kitless package (prepack/bundle-kit regression guard).
if: matrix.os == 'ubuntu-latest' && matrix.node == 'latest'
run: |
npm pack >/dev/null 2>&1
TGZ="$(ls -t ./*.tgz | head -1)"
tar -tzf "$TGZ" | grep -q 'package/kit/install.sh' || { echo "::error::tarball missing kit/install.sh"; exit 1; }
tar -tzf "$TGZ" | grep -q 'package/kit/primer-policy.md' || { echo "::error::tarball missing kit/primer-policy.md"; exit 1; }
rm -f "$TGZ"
echo "kit bundled into tarball OK"