Skip to content

Commit 41268f9

Browse files
ci: restore final cross-platform validation
1 parent ea963f7 commit 41268f9

1 file changed

Lines changed: 33 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,53 @@
1-
name: Windows diagnostic
1+
name: CI
22

33
on:
4+
push:
5+
branches: ['main', 'agent/**']
46
pull_request:
57

68
permissions:
79
contents: read
810

911
jobs:
10-
windows-test:
11-
runs-on: windows-latest
12+
test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
node-version: 22
19+
upload-source: false
20+
- os: ubuntu-latest
21+
node-version: 24
22+
upload-source: true
23+
- os: windows-latest
24+
node-version: 24
25+
upload-source: false
26+
runs-on: ${{ matrix.os }}
1227
steps:
1328
- uses: actions/checkout@v4
1429
- uses: actions/setup-node@v4
1530
with:
16-
node-version: 24
31+
node-version: ${{ matrix.node-version }}
32+
cache: npm
33+
cache-dependency-path: global-template/docgen/package.json
1734
- name: Syntax check
1835
working-directory: global-template/docgen
1936
run: npm run check
20-
- name: Unit and integration tests with concise failure artifact
37+
- name: Unit and integration tests
2138
working-directory: global-template/docgen
22-
shell: pwsh
23-
run: |
24-
npm test *> test-output.log
25-
$exitCode = $LASTEXITCODE
26-
if ($exitCode -ne 0) {
27-
Select-String -Path test-output.log -Pattern 'not ok|AssertionError|ERR_ASSERTION|error:|failureType|expected:|actual:|operator:|stack:' -Context 6,20 | Out-String -Width 500 | Set-Content failure-context.txt
28-
Get-Content failure-context.txt
29-
exit $exitCode
30-
}
31-
Get-Content test-output.log -Tail 30
32-
- name: Upload Windows failure context
33-
if: always()
39+
run: npm test
40+
- name: Installer dry run
41+
run: node install.mjs --dry-run --no-link-cli
42+
- name: Upload exact CI source
43+
if: always() && matrix.upload-source
3444
uses: actions/upload-artifact@v4
3545
with:
36-
name: windows-failure-context
46+
name: docgen-ci-source
3747
if-no-files-found: error
3848
retention-days: 3
39-
path: global-template/docgen/failure-context.txt
49+
path: |
50+
global-template/docgen
51+
global-template/docgen/project-template
52+
install.mjs
53+
VERSION

0 commit comments

Comments
 (0)