Skip to content

Commit

Permalink
internal/ci: run long tests on linux when testing CLs
Browse files Browse the repository at this point in the history
It's too easy to forget that CUE_LONG exists,
particularly since it is rarely used by our tests,
and CI enables it when testing master but not when testing CLs.

Enable it when testing CLs as well.
However, since Windows is particularly slow to run,
and we need the trybots to be reasonably fast to iterate on CLs,
we only enable it on CLs for the "latest linux" matrix cell.

In the very unlikely case that only a different OS or Go version broke
the long tests in a CL, the entire matrix will enable them when testing
the default branch once the CL is merged.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ia88f26439aea324f9d229b170e58e85136210641
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551229
Reviewed-by: Paul Jolly <paul@myitcv.io>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
  • Loading branch information
mvdan committed Mar 18, 2023
1 parent fa1f369 commit daa4022
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trybot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
exit 1
fi
done
- if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.'))
- if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) || (matrix.go-version == '1.19.x' && matrix.os == 'ubuntu-20.04')
run: echo CUE_LONG=true >> $GITHUB_ENV
- if: (matrix.go-version == '1.19.x' && matrix.os == 'ubuntu-20.04')
name: Generate
Expand Down
2 changes: 1 addition & 1 deletion internal/ci/github/trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ trybot: _base.#bashWorkflow & {
if: _#isLatestLinux
},
json.#step & {
if: _#isProtectedBranch
if: "\(_#isProtectedBranch) || \(_#isLatestLinux)"
run: "echo CUE_LONG=true >> $GITHUB_ENV"
},
_#goGenerate,
Expand Down

0 comments on commit daa4022

Please sign in to comment.