Repository navigation
ci: consolidate integration test suites into one build + fan-out workflow - #1306
Merged
Merged
Conversation
Adds .github/workflows/integration-tests.yml, which builds the Charon image a single time via the shared build-charon-image composite action, uploads it as a 1-day run-scoped artifact, then fans out to parallel per-suite test jobs (cerberus / waf / rate-limit / crowdsec) that `docker load` that image instead of rebuilding it. Replaces four near-identical standalone workflows that each paid the image-build cost independently. Each suite job keeps its own test steps, debug-dump-on-failure and cleanup verbatim (each inspects different containers/ports/volumes). Job/check names are preserved so the diff is reviewable, but they now live under one workflow. Also guards the unconditional `docker build` in scripts/crowdsec_integration.sh behind a `docker image inspect charon:local` check, matching the sibling scripts (crowdsec_startup_test.sh, cerberus/waf/rate_limit_integration.sh) so the crowdsec job actually consumes the pre-built artifact rather than rebuilding the image a second time. Claude-Session: https://claude.ai/code/session_01KXA4x9LrA2AsnLrvdHMZbS
Points docs and instructions that named the four deleted workflow files (cerberus-integration.yml / waf-integration.yml / rate-limit-integration.yml / crowdsec-integration.yml) at .github/workflows/integration-tests.yml and its per-suite jobs instead. Claude-Session: https://claude.ai/code/session_01KXA4x9LrA2AsnLrvdHMZbS
Contributor
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
✅ Supply Chain Verification Results✅ PASSED 📦 SBOM Summary
🔍 Vulnerability Scan
📎 Artifacts
Generated by Supply Chain Verification workflow • View Details |
Wikid82
marked this pull request as ready for review
September 8, 2026 07:46
Wikid82
marked this pull request as draft
September 8, 2026 07:52
Wikid82
marked this pull request as ready for review
September 8, 2026 07:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Consolidates the four near-identical integration-test workflows into a single
.github/workflows/integration-tests.ymlthat builds the Charon image onceper run and fans out to parallel per-suite test jobs.
Before:
cerberus-integration.yml,waf-integration.yml,rate-limit-integration.yml,crowdsec-integration.yml— four workflows, onejob each, every one of them running
./.github/actions/build-charon-imageindependently (~2-4 min same-repo, ~14 min on fork PRs) before its tests.
After: one
buildjob runs the composite action once,docker savescharon:localand uploads it as a 1-day run-scoped artifact; four suite jobs(
cerberus,waf,rate-limit,crowdsec)needs: build,docker loadtheartifact, and run that suite's existing test + debug-dump + cleanup steps
verbatim. Net effect: the image build is paid once instead of 4×, and 3
runner slots are freed for the duration of the build.
Structure
Four explicit jobs, not a matrix: the suites are not uniform (crowdsec runs
two test suites; cerberus has an extra container-log artifact step; every
debug-dump inspects different ports/containers/volumes; every cleanup removes
different volumes). A matrix would need
if:ladders on almost every step —per the repo guidance, clarity beats DRY here.
Image hand-off mechanism
Uses the repo's existing cross-job pattern from
security-pr.yml/docker-build.yml:docker save+actions/upload-artifactinbuild,actions/download-artifact+docker loadin each suite job. Becausebuildand the suite jobs are in the same workflow run, no
gh apiartifacthunting is needed (that machinery in
security-pr.ymlexists only for thecross-workflow
workflow_runhop). No GHCR scratch tag, nopackages: write— the artifact approach has no blocker at this image size with 1-day retention.
Trigger / concurrency
workflow_dispatch+pull_request+pushtomain. (None of the four hadpaths:filters, so there is nothing to unionthere; all four still ran on every PR.) The unused
workflow_dispatchimage_taginput — declared in all four old workflows but never referenced byany step — is dropped.
${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }},cancel-in-progress: true— the four old groups were identical(
…-${{ github.event.workflow_run.event || github.event_name }}-${{ github.event.workflow_run.head_branch || github.ref }});with no
workflow_runtrigger theworkflow_run.*halves are always empty, sothis is the same group with the dead fallbacks removed.
Timeouts
build:timeout-minutes: 20— unchanged; the fork-PR inline-compile floor(~14 min) still applies to the shared build. B6 comment preserved.
cerberus/waf/rate-limitat12,crowdsecat15(two suites) — the ~14 min inline-compile floor no longer applies to these now
that the build is upstream; sized for test-only work.
Behavior change to flag for review
scripts/crowdsec_integration.sh(the deprecated wrapper thecrowdsecjobreaches via
skill-runner integration-test-crowdsec) randocker build -t charon:local .unconditionally, so the oldcrowdsec-integration.ymlactually built the image twice (composite + script). It is now guarded behind
docker image inspect charon:local, matching its four sibling scripts(
crowdsec_startup_test.sh,cerberus/waf/rate_limit_integration.sh), so thejob consumes the pre-built artifact. Consequence: the crowdsec suite now runs
against the composite-built image (built with the
ci: 'true'build-arg thatcrowdsec-integration.ymlalready passed) rather than a plain script-built one.Local runs are unaffected (no pre-existing
charon:local→ still builds).The shared
buildjob passesci: 'true'(crowdsec's old value; the otherthree passed the default
'false'). TheCIbuild-arg only makes the GeoLite2download fail-fast instead of retrying — no test-surface impact for waf /
cerberus / rate-limit.
No test or service/container was dropped. Every suite's test steps, debug-dump
step and cleanup step are copied across unchanged.
The four old workflows' check names disappear and reappear as jobs under the new
Integration Testsworkflow. Branch protection formainanddevelopmentmust be updated — the check names themselves are unchanged, but the
identifying workflow is not, so GitHub treats them as new checks:
Cerberus Security Stack Integration(Cerberus Integration)Cerberus Security Stack Integration(Integration Tests)Coraza WAF Integration(WAF integration)Coraza WAF Integration(Integration Tests)Rate Limiting Integration(Rate Limit integration)Rate Limiting Integration(Integration Tests)CrowdSec Bouncer Integration(CrowdSec Integration)CrowdSec Bouncer Integration(Integration Tests)Build Charon image(Integration Tests) — add as requiredNotes
the
build-charon-imagecomposite runs exactly once and the suite jobs loadthe artifact (no rebuild).
feat/prebuilt-toolchain-image(feat(ci): prebuilt Caddy/CrowdSec toolchain image to fix Docker-build timeouts #1300); that PR hassince merged to
main, so this is rebased onto and targetsmaindirectly.