gitlab-ci: enable "GIT_TEST_LONG"
Starting with 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08) we run expensive tests in our CI for certain events. So far, this has only been wired up for GitHub Workflows though, which creates a test gap for GitLab CI. Plug this gap by also making this work for the latter. Note that these tests cannot be run on the Windows runners, as they only have 7.5GB of RAM. This is insufficient for some of the EXPENSIVE tests, so we explicitly disable "GIT_TEST_LONG" on these jobs. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Jul 6, 2026 at 08:24 UTC
84248444ad9577ba7f0bf0679d57c629166eb903
2 files changed
+16
-2
.gitlab-ci.yml
+6
@@ -147,6 +147,9 @@ test:mingw64:
147
needs:
148
- job: "build:mingw64"
149
artifacts: true
150
+ variables:
151
+ # Windows runners don't have enough RAM to run EXPENSIVE tests.
152
+ GIT_TEST_LONG: false
153
before_script:
154
- *windows_before_script
155
- git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
@@ -195,6 +198,9 @@ test:msvc-meson:
198
script:
199
- |
200
& "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
201
+ variables:
202
+ # Windows runners don't have enough RAM to run EXPENSIVE tests.
203
+ GIT_TEST_LONG: false
204
after_script:
205
- |
206
if ($env:CI_JOB_STATUS -ne "success") {
ci/lib.sh
+10
-2
@@ -215,6 +215,7 @@ then
215
test macos != "$CI_OS_NAME" || CI_OS_NAME=osx
216
CI_REPO_SLUG="$GITHUB_REPOSITORY"
217
CI_JOB_ID="$GITHUB_RUN_ID"
218
+ CI_EVENT="$GITHUB_EVENT_NAME"
219
CC="${CC_PACKAGE:-${CC:-gcc}}"
220
DONT_SKIP_TAGS=t
221
handle_failed_tests () {
@@ -239,6 +240,13 @@ then
240
CI_BRANCH="$CI_COMMIT_REF_NAME"
241
CI_COMMIT="$CI_COMMIT_SHA"
242
243
+ case "$CI_PIPELINE_SOURCE" in
244
+ merge_request_event)
245
+ CI_EVENT=pull_request;;
246
+ *)
247
+ CI_EVENT="$CI_PIPELINE_SOURCE";;
248
+ esac
249
+
250
case "$OS,$CI_JOB_IMAGE" in
251
Windows_NT,*)
252
CI_OS_NAME=windows
@@ -319,9 +327,9 @@ export SKIP_DASHED_BUILT_INS=YesPlease
327
# enable "expensive" tests for PR events.
328
# In order to catch bugs introduced at integration time by mismerges,
329
# enable the long tests for pushes to the integration branches as well.
322
-case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
330
+case "$CI_EVENT,$CI_BRANCH" in
331
pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
324
- export GIT_TEST_LONG=true
332
+ export GIT_TEST_LONG=${GIT_TEST_LONG:-true}
333
;;
334
esac
335