Compare commits

...

7 Commits

Author SHA1 Message Date
Nicholas Tindle
f724d57755 Merge branch 'ci/gate-e2e-behind-label' of https://github.com/Significant-Gravitas/AutoGPT into ci/gate-e2e-behind-label 2026-04-03 16:42:21 +02:00
Nicholas Tindle
11338dd59d fix(ci): override working-directory for gate job
The workflow default working-directory is autogpt_platform/frontend, but
the gate job doesn't check out the repo. Bash fails before running echo
because the directory doesn't exist. Override to . for this job.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:41:16 +02:00
Nicholas Tindle
0d679124e9 Merge branch 'dev' into ci/gate-e2e-behind-label 2026-04-03 11:04:55 +02:00
Nicholas Tindle
6def40bfd6 ci(platform): revert gate skip on irrelevant labels (bypass fix)
The job-level `if` that skipped the gate on non-ci-ready label events
created a bypass: skipped jobs produce a `skipped` conclusion, which the
status checker treats as passing. Adding any random label would override
a previous gate failure, unblocking the PR without ci-ready.

Revert to always running the gate. Irrelevant labels will cause the gate
to fail (cosmetic noise), but the alternative is a security bypass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:19:32 +02:00
Nicholas Tindle
65d45a7706 ci(platform): don't cancel in-progress runs on label events
Labeled events share the same concurrency group as synchronize events.
Without this fix, adding any label to a PR would cancel in-progress E2E
tests on the big-boi runner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:22:22 +02:00
Nicholas Tindle
a87d95c1ca ci(platform): skip gate on irrelevant label events
When a non-ci-ready label is added to a PR, skip the gate entirely
(conclusion: skipped) instead of failing. This prevents irrelevant labels
from blocking the PR via the "Check PR Status" aggregator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:08:46 +02:00
Nicholas Tindle
52010c691c ci(platform): gate E2E tests behind ci-ready PR label
The big-boi runner costs $1400/month. Gate E2E tests behind a `ci-ready`
label so they only run when a PR is actually ready for full CI. A new
`e2e-label-gate` job fails immediately on PRs without the label,
preventing merge via the existing "Check PR Status" aggregator. Push and
merge_group events bypass the gate so master/dev CI is unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:59:37 +02:00
2 changed files with 25 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ on:
- ".github/workflows/scripts/get_package_version_from_lockfile.py"
- "autogpt_platform/**"
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- ".github/workflows/platform-fullstack-ci.yml"
- ".github/workflows/scripts/docker-ci-fix-compose-build-cache.py"
@@ -18,7 +19,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'merge_group' && format('merge-queue-{0}', github.ref) || github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action != 'labeled' }}
defaults:
run:
@@ -142,9 +143,31 @@ jobs:
run: pnpm types
if: success() || (steps.generate-api-client.outcome == 'success')
e2e-label-gate:
name: E2E label gate
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: Check for ci-ready label
if: >-
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.labels.*.name, 'ci-ready')
run: |
echo "::error::The 'ci-ready' label is required to run E2E tests."
echo "Add the 'ci-ready' label to this PR to trigger E2E tests on the big-boi runner."
exit 1
- name: Label present or not a PR
if: >-
github.event_name != 'pull_request'
|| contains(github.event.pull_request.labels.*.name, 'ci-ready')
run: echo "E2E tests authorized to run."
e2e_test:
name: end-to-end tests
runs-on: big-boi
needs: [e2e-label-gate]
steps:
- name: Checkout repository

View File

@@ -1,7 +1,7 @@
name: Repo - PR Status Checker
on:
pull_request:
types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened, labeled]
merge_group:
jobs: