ci: run -race on PRs as well (#1408)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
7
.github/workflows/commit.yaml
vendored
7
.github/workflows/commit.yaml
vendored
@@ -76,12 +76,9 @@ jobs:
|
|||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- run: make test
|
# Run -race could be really slow without -short, so run them together on this workflow.
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
# Since -short is not added in the scratch tests, all the tests are run in CI in practice.
|
||||||
|
|
||||||
# Run tests with -race only on main branch push.
|
|
||||||
- run: make test go_test_options='-timeout 10m -race -short'
|
- run: make test go_test_options='-timeout 10m -race -short'
|
||||||
if: ${{ github.event_name == 'push' }}
|
|
||||||
|
|
||||||
- name: "Generate coverage report" # only once (not per OS)
|
- name: "Generate coverage report" # only once (not per OS)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ func Test733(t *testing.T) {
|
|||||||
t.Run(name, func(t *testing.T) {
|
t.Run(name, func(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
// Note: this case uses large memory space, so can be slow like 1 to 2 seconds even without -race.
|
// 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()
|
t.SkipNow()
|
||||||
}
|
}
|
||||||
f := mod.ExportedFunction(name)
|
f := mod.ExportedFunction(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user