From a3e1f3b05c53b7a8a9df5876a8ffc18b7cc8f987 Mon Sep 17 00:00:00 2001 From: Malaber Date: Sat, 11 Apr 2026 16:14:28 +0200 Subject: [PATCH] Add CI spec skip variables --- .gitlab-ci.yml | 8 ++++++++ AGENTS.md | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9366723..2db4e4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,10 @@ rails spec: rules: - if: $SKIP_TEST when: never + - if: $SKIP_ALL_SPECS + when: never + - if: $SKIP_RAILS_SPEC + when: never - if: $CI_PIPELINE_SOURCE != "push" when: never - when: always @@ -64,6 +68,10 @@ rails e2e spec: rules: - if: $SKIP_TEST when: never + - if: $SKIP_ALL_SPECS + when: never + - if: $SKIP_E2E_SPEC + when: never - if: $CI_PIPELINE_SOURCE != "push" when: never - when: always diff --git a/AGENTS.md b/AGENTS.md index 54c756d..7027e6b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,14 @@ The GitLab CI pipeline is expected to use these tasks as well. In CI, blackbox E2E should target sidecar service containers rather than Docker Compose inside the job. The normal Rails spec suite is sharded through `inv test-shard ...` and should stay aligned with the CI matrix configuration. +Useful GitLab push-option variables for saving CI minutes on public repos: + +- skip all spec jobs: `git push -o ci.variable="SKIP_ALL_SPECS=1"` +- skip only normal Rails specs: `git push -o ci.variable="SKIP_RAILS_SPEC=1"` +- skip only blackbox E2E: `git push -o ci.variable="SKIP_E2E_SPEC=1"` + +Do not use these by default. Only use them when the change truly does not affect the skipped area. + This is not just a convenience preference. The task layer is the operational contract for this repo and should stay aligned across local use, CI, and cross-repo consumers.