ci: exercise Windows shell and interrupted install regressions #864
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: VersionFox CI | |
| on: [push, workflow_dispatch] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| go-version: [ '1.21.x' ] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Install dependencies | |
| run: | | |
| go get . | |
| - name: Build | |
| run: | | |
| go build . | |
| - name: Test and coverage | |
| run: | | |
| go test ./... -coverprofile=coverage.out -covermode=atomic | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| windows-regressions: | |
| name: Windows shell and interrupted installation regressions | |
| runs-on: windows-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: go.mod | |
| - uses: msys2/setup-msys2@v2 | |
| id: msys2 | |
| with: | |
| msystem: MSYS | |
| install: zsh | |
| - name: Exercise native Windows processes and MSYS2 zsh | |
| shell: pwsh | |
| env: | |
| MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} | |
| VFOX_TEST_MSYS_ZSH: '1' | |
| run: | | |
| $env:PATH = "$env:MSYS2_LOCATION\usr\bin;$env:PATH" | |
| go test ./internal/env -run 'TestWindowsPathFormatByShell|TestMSYSZshPATH' -count=1 -v | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| go test ./internal/shell -run TestOpenSkipsVfoxShim -count=1 -v | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| go test ./internal/sdk -run '^TestInstall' -count=1 -v | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } |