-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (82 loc) · 2.56 KB
/
Copy pathphase2-bootstrap.yml
File metadata and controls
86 lines (82 loc) · 2.56 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
83
84
85
86
name: Phase 2 bootstrap
on:
push:
branches: ['agent/token-efficient-semantic-index']
permissions:
contents: write
jobs:
apply:
if: ${{ github.actor != 'github-actions[bot]' }}
runs-on: ubuntu-latest
outputs:
commit_sha: ${{ steps.commit.outputs.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Apply Phase 2 patch
shell: bash
run: |
set -euo pipefail
cat .github/phase2-parts/part-* | base64 -d | gzip -d > /tmp/phase2.patch
patch -p1 < /tmp/phase2.patch
rm -rf .github/phase2-parts .github/workflows/phase2-bootstrap.yml
git diff --check
- name: Validate implementation
shell: bash
run: |
set -euo pipefail
cd global-template/docgen
npm run check
DOCGEN_PROGRESS=0 npm test
cd ../..
node install.mjs --dry-run --no-link-cli
node - <<'NODE'
const fs = require('fs');
const path = require('path');
for (const name of fs.readdirSync('global-template/docgen/schemas')) {
if (name.endsWith('.json')) JSON.parse(fs.readFileSync(path.join('global-template/docgen/schemas', name), 'utf8'));
}
console.log('schemas ok');
NODE
- name: Commit final implementation
id: commit
shell: bash
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "feat: stabilize runtime and add stack-neutral quality gates"
git push origin "HEAD:${GITHUB_REF_NAME}"
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
validate:
needs: apply
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
node: 22
- os: ubuntu-latest
node: 24
- os: windows-latest
node: 24
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.apply.outputs.commit_sha }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Syntax and full test suite
working-directory: global-template/docgen
run: |
npm run check
npm test
- name: Installer dry run
run: node install.mjs --dry-run --no-link-cli