Skip to content

Commit fa6d72d

Browse files
committed
fix: avoid coverage.out parsing issue on Windows
Split test step into two conditional steps: - Run tests without coverage on Windows and macOS - Run tests with coverage only on ubuntu-latest This avoids PowerShell parsing '-coverprofile=coverage.out' as '.out' on Windows.
1 parent e106412 commit fa6d72d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/go.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
run: go mod download
2828

2929
- name: Run unit tests
30+
if: matrix.os != 'ubuntu-latest'
31+
run: go test -race ./...
32+
33+
- name: Run unit tests with coverage
34+
if: matrix.os == 'ubuntu-latest'
3035
run: go test -race -coverprofile=coverage.out ./...
3136

3237
- name: Build

0 commit comments

Comments
 (0)