Skip to content

Commit 190488a

Browse files
ci: isolate Windows test failure output
1 parent 2e9cfd5 commit 190488a

1 file changed

Lines changed: 15 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,31 @@
1-
name: CI
1+
name: Windows diagnostic
22

33
on:
4-
push:
5-
branches: ['main', 'agent/**']
64
pull_request:
75

86
permissions:
97
contents: read
108

119
jobs:
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 }}
10+
windows-test:
11+
runs-on: windows-latest
2712
steps:
2813
- uses: actions/checkout@v4
2914
- uses: actions/setup-node@v4
3015
with:
31-
node-version: ${{ matrix.node-version }}
32-
cache: npm
33-
cache-dependency-path: global-template/docgen/package.json
16+
node-version: 24
3417
- name: Syntax check
3518
working-directory: global-template/docgen
3619
run: npm run check
37-
- name: Unit and integration tests
20+
- name: Unit and integration tests with concise failure output
3821
working-directory: global-template/docgen
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
44-
uses: actions/upload-artifact@v4
45-
with:
46-
name: docgen-ci-source
47-
if-no-files-found: error
48-
retention-days: 3
49-
path: |
50-
global-template/docgen
51-
global-template/docgen/project-template
52-
install.mjs
53-
VERSION
22+
shell: pwsh
23+
run: |
24+
npm test *> test-output.log
25+
$exitCode = $LASTEXITCODE
26+
if ($exitCode -ne 0) {
27+
Write-Host '=== FAILURE CONTEXT ==='
28+
Select-String -Path test-output.log -Pattern 'not ok|AssertionError|ERR_ASSERTION|error:|failureType|expected:|actual:' -Context 4,12
29+
exit $exitCode
30+
}
31+
Get-Content test-output.log -Tail 30

0 commit comments

Comments
 (0)