ci: run -race on PRs as well (#1408)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-04-26 17:54:59 -07:00
committed by GitHub
parent 867459d7d5
commit 86444c67a3
2 changed files with 3 additions and 5 deletions

View File

@@ -76,12 +76,9 @@ jobs:
go-version: ${{ matrix.go-version }}
cache: true
- run: make test
if: ${{ github.event_name == 'pull_request' }}
# Run tests with -race only on main branch push.
# Run -race could be really slow without -short, so run them together on this workflow.
# Since -short is not added in the scratch tests, all the tests are run in CI in practice.
- run: make test go_test_options='-timeout 10m -race -short'
if: ${{ github.event_name == 'push' }}
- name: "Generate coverage report" # only once (not per OS)
if: runner.os == 'Linux'

View File

@@ -319,6 +319,7 @@ func Test733(t *testing.T) {
t.Run(name, func(t *testing.T) {
if testing.Short() {
// Note: this case uses large memory space, so can be slow like 1 to 2 seconds even without -race.
// The reason is that this test requires roughly 2GB of in-Wasm memory.
t.SkipNow()
}
f := mod.ExportedFunction(name)