Skip to content

Commit

Permalink
internal/ci: ensure internal/_e2e isn't broken in CI
Browse files Browse the repository at this point in the history
I have broken the build of the internal/_e2e tests more than once,
most recently fixed in https://cuelang.org/cl/1198297,
as we only actually run these tests on pushes to protected branches.

However, it's easy to build the tests in a CI run before merging,
and that will catch most of these mistakes which can happen as a result
of refactors or other API changes which internal/_e2e uses.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I529ed3b1d52e86ef1f9c41744ebc2d97ef3d77a2
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198300
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
mvdan committed Jul 23, 2024
1 parent cf6641c commit 00879f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/trybot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ jobs:
run: |-
go vet ./...
go mod tidy
(cd internal/_e2e && go test -run=-)
- if: always()
name: Check that git is clean at the end of the job
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
5 changes: 5 additions & 0 deletions internal/ci/github/trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,17 @@ workflows: trybot: _repo.bashWorkflow & {
// However, CUE does not have any such build tags yet, and we don't use
// dependencies that vary wildly between platforms.
// For now, to save CI resources, just run the checks on one matrix job.
//
// Also ensure that the end-to-end tests in ./internal/_e2e, which are only run
// on pushes to protected branches, still build correctly before merging.
//
// TODO: consider adding more checks as per https://github.com/golang/go/issues/42119.
if: "\(_isLatestLinux)"
name: "Check"
run: """
go vet ./...
go mod tidy
(cd internal/_e2e && go test -run=-)
"""
}

Expand Down

0 comments on commit 00879f0

Please sign in to comment.