ci: capture full Windows Phase 2 test output #231
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ['main', 'agent/**'] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| node-version: 22 | |
| upload-source: false | |
| - os: ubuntu-latest | |
| node-version: 24 | |
| upload-source: true | |
| - os: windows-latest | |
| node-version: 24 | |
| upload-source: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| cache-dependency-path: global-template/docgen/package.json | |
| - name: Syntax check | |
| working-directory: global-template/docgen | |
| run: npm run check | |
| - name: Unit and integration tests | |
| if: runner.os != 'Windows' | |
| working-directory: global-template/docgen | |
| run: npm test | |
| - name: Unit and integration tests with diagnostics | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| working-directory: global-template/docgen | |
| run: | | |
| $output = & npm test 2>&1 | |
| $code = $LASTEXITCODE | |
| $output | Tee-Object -FilePath windows-test-output.txt | |
| exit $code | |
| - name: Upload Windows test diagnostics | |
| if: always() && runner.os == 'Windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-test-output | |
| if-no-files-found: error | |
| retention-days: 1 | |
| path: global-template/docgen/windows-test-output.txt | |
| - name: Installer dry run | |
| run: node install.mjs --dry-run --no-link-cli | |
| - name: Upload exact CI source | |
| if: always() && matrix.upload-source | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docgen-ci-source | |
| if-no-files-found: error | |
| retention-days: 3 | |
| path: | | |
| global-template/docgen | |
| global-template/docgen/project-template | |
| install.mjs | |
| VERSION |