diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92ef1b6..be2f6c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,21 +35,24 @@ jobs: with: go-version: ${{ matrix.go-version }} cache: false - - name: Test + # linux already runs the tests with -race below, plus extra checks, + # so skip the regular tests to prevent it from taking the longest. + - if: matrix.os != 'ubuntu-latest' run: go test -timeout=15m ./... + # macos and windows failures with bincmp can be hard to reproduce locally, + # so upload the binaries as artifacts. - uses: actions/upload-artifact@v3 if: failure() with: name: bincmp_output path: bincmp_output/ - - name: Test with -race - # macos and windows tend to be a bit slower, - # and it's rare that a race in garble would be OS-specific. - if: matrix.os == 'ubuntu-latest' + # macos and windows tend to be a bit slower, + # and it's rare that a race in garble would be OS-specific. + - if: matrix.os == 'ubuntu-latest' run: go test -race -timeout=20m ./... # Static checks from this point forward. Only run on one Go version and on - # Linux, since it's the fastest platform, and the tools behave the same. + # linux, since it's the fastest platform, and the tools behave the same. - name: Test third-party project builds if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.20.x' run: |