Skip to content

Commit

Permalink
CI: don't use go test -race on Windows
Browse files Browse the repository at this point in the history
It's just too slow, at 6m when linux does more and only takes 1m.
Luckily, the vast majority of our code is not GOOS-specific,
so running the race detector on linux is most likely enough.

This should cut down Windows builds by over two minutes,
as that's how long `go test -race` takes there.
For consistency, drop -race on Mac as well.
  • Loading branch information
mvdan committed Mar 20, 2023
1 parent 822b795 commit a8d7768
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3

- run: go test ./...
- run: go test -race ./...

- run: go test -race ./...
if: matrix.os == 'ubuntu-latest'
- run: GOARCH=386 go test -count=1 ./...
if: matrix.os == 'ubuntu-latest'
- name: confirm tests with Bash 5.1
Expand Down

0 comments on commit a8d7768

Please sign in to comment.