Skip to content

Commit 871b863

Browse files
tazarovclaude
andcommitted
fix: Split go test command for Windows compatibility
- Separate Unix and Windows test commands in workflows - Remove -coverprofile flag from Windows PowerShell commands - Fixes parsing error: "no required module provides package .out" Windows PowerShell was incorrectly parsing the -coverprofile=coverage.out argument, treating ".out" as a package name. This splits the test commands by platform to avoid the issue. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2f085bf commit 871b863

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/go-ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,23 @@ jobs:
110110
env:
111111
GITHUB_TOKEN: ${{ github.token }}
112112

113-
- name: Run Go tests
113+
- name: Run Go tests (Unix)
114+
if: matrix.os != 'windows-latest'
114115
run: |
115116
go mod tidy
116117
go test -v -coverprofile=coverage.out -timeout=30m ./...
117118
env:
118119
GITHUB_TOKEN: ${{ github.token }}
119120

121+
- name: Run Go tests (Windows)
122+
if: matrix.os == 'windows-latest'
123+
shell: pwsh
124+
run: |
125+
go mod tidy
126+
go test -v -timeout=30m ./...
127+
env:
128+
GITHUB_TOKEN: ${{ github.token }}
129+
120130
integration-test:
121131
name: Integration Tests
122132
runs-on: ubuntu-latest

.github/workflows/go-release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,23 @@ jobs:
9494
env:
9595
GITHUB_TOKEN: ${{ github.token }}
9696

97-
- name: Run Go tests
97+
- name: Run Go tests (Unix)
98+
if: matrix.os != 'windows-latest'
9899
run: |
99100
go mod tidy
100101
go test -v -race -coverprofile=coverage.out -timeout=30m ./...
101102
env:
102103
GITHUB_TOKEN: ${{ github.token }}
103104

105+
- name: Run Go tests (Windows)
106+
if: matrix.os == 'windows-latest'
107+
shell: pwsh
108+
run: |
109+
go mod tidy
110+
go test -v -race -timeout=30m ./...
111+
env:
112+
GITHUB_TOKEN: ${{ github.token }}
113+
104114
release:
105115
name: Create Go Module Release
106116
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)