Skip to content

Commit

Permalink
internal/ci: run the end-to-end tests with -race
Browse files Browse the repository at this point in the history
This would have meant catching data races like the one fixed by
https://cuelang.org/cl/1176581 much sooner,
since -race makes it far more likely to spot them.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie4b6f4111a3b47a0a0304cc56adab25eefd88f40
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1176657
TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
mvdan committed Feb 10, 2024
1 parent 64c5656 commit a948eb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trybot.yml
Expand Up @@ -188,7 +188,7 @@ jobs:
CUE_LOGINS: ${{ secrets.E2E_CUE_LOGINS }}
run: |-
cd internal/e2e
go test
go test -race
- if: (matrix.go-version == '1.22.x' && matrix.runner == 'ubuntu-22.04')
name: Check
run: |-
Expand Down
6 changes: 5 additions & 1 deletion internal/ci/github/trybot.cue
Expand Up @@ -145,9 +145,13 @@ workflows: trybot: _repo.bashWorkflow & {
GITHUB_TOKEN: "${{ secrets.E2E_GITHUB_TOKEN }}"
CUE_LOGINS: "${{ secrets.E2E_CUE_LOGINS }}"
}
// Our regular tests run with both `go test ./...` and `go test -race ./...`.
// The end-to-end tests should only be run once, given the slowness and API rate limits.
// We want to catch any data races they spot as soon as possible, and they aren't CPU-bound,
// so running them only with -race seems reasonable.
run: """
cd internal/e2e
go test
go test -race
"""
},
]
Expand Down

0 comments on commit a948eb5

Please sign in to comment.