-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.22 KB
/
Copy pathci.yml
File metadata and controls
39 lines (36 loc) · 1.22 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
name: Windows diagnostic
on:
pull_request:
permissions:
contents: read
jobs:
windows-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Syntax check
working-directory: global-template/docgen
run: npm run check
- name: Unit and integration tests with concise failure artifact
working-directory: global-template/docgen
shell: pwsh
run: |
npm test *> test-output.log
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
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
Get-Content failure-context.txt
exit $exitCode
}
Get-Content test-output.log -Tail 30
- name: Upload Windows failure context
if: always()
uses: actions/upload-artifact@v4
with:
name: windows-failure-context
if-no-files-found: error
retention-days: 3
path: global-template/docgen/failure-context.txt