Repository navigation
tura completed tura-1783420892750-74af4527-6af4-46b1-88fc-d376a0376c7… #9
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: Windows Install | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| clean-install: | |
| name: Clean install ${{ matrix.runner }} | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner: | |
| - windows-2022 | |
| - windows-2025 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify clean checkout has no command virtual environments | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| Get-ChildItem -LiteralPath commands -Directory | ForEach-Object { | |
| $venv = Join-Path $_.FullName ".venv" | |
| if (Test-Path -LiteralPath $venv) { | |
| throw "Unexpected command virtual environment in clean checkout: $venv" | |
| } | |
| } | |
| - name: Run Windows install script tests | |
| id: install | |
| shell: powershell | |
| continue-on-error: true | |
| run: | | |
| $ErrorActionPreference = "Continue" | |
| New-Item -ItemType Directory -Path .ci-results -Force | Out-Null | |
| powershell -NoProfile -ExecutionPolicy Bypass -File scripts\tests\scripts\test-install.ps1 -SkipApps *>&1 | Tee-Object -FilePath .ci-results\install.log | |
| $exitCode = $LASTEXITCODE | |
| "exit_code=$exitCode" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 | |
| if ($exitCode -ne 0) { exit $exitCode } | |
| - name: Prepare install result artifact | |
| if: always() | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| $resultDir = ".ci-results\windows-install\${{ matrix.runner }}" | |
| if (Test-Path -LiteralPath $resultDir) { | |
| Remove-Item -LiteralPath $resultDir -Recurse -Force | |
| } | |
| New-Item -ItemType Directory -Path $resultDir | Out-Null | |
| $logPath = Join-Path $resultDir "install.log" | |
| if (Test-Path -LiteralPath ".ci-results\install.log") { | |
| Copy-Item -LiteralPath ".ci-results\install.log" -Destination $logPath | |
| } else { | |
| "install.log was not produced" | Set-Content -LiteralPath $logPath | |
| } | |
| $statusPath = Join-Path $resultDir "status.txt" | |
| @( | |
| "source_commit=${{ github.sha }}", | |
| "runner=${{ matrix.runner }}", | |
| "job_status=${{ job.status }}", | |
| "install_outcome=${{ steps.install.outcome }}", | |
| "install_exit_code=${{ steps.install.outputs.exit_code }}", | |
| "run_id=${{ github.run_id }}", | |
| "run_attempt=${{ github.run_attempt }}" | |
| ) | Set-Content -LiteralPath $statusPath | |
| - name: Upload install result artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-install-${{ matrix.runner }}-result | |
| path: .ci-results/windows-install/${{ matrix.runner }}/ | |
| if-no-files-found: error | |
| - name: Fail if install failed | |
| if: steps.install.outcome != 'success' | |
| shell: pwsh | |
| run: exit 1 |