♻️ tests: run e2e suite in a single sequential job

The matrix spawned one runner per scenario, so the Traefik, Crowdsec and
whoami images were pulled — and Crowdsec booted — once per scenario. Run
the whole suite in a single job with `make -k e2e` instead: Docker caches
the images locally so they are pulled only once, and `-k` keeps the
remaining scenarios running after a failure (make still exits non-zero).

Scenarios already share the canonical `crowdsec` container name and the
8000 port, so they were meant to run sequentially anyway.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
mhx
2026-06-06 12:03:19 +02:00
co-authored by Claude Opus 4.8
parent d1bdd7b423
commit 33def87c30
2 changed files with 23 additions and 26 deletions
+10 -16
View File
@@ -14,27 +14,21 @@ permissions:
jobs:
e2e:
name: ${{ matrix.scenario }}
name: e2e
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scenario:
- stream-mode
- live-mode
- none-mode
- trusted-ips
- custom-ban-page
- captcha
- appsec
steps:
- uses: actions/checkout@v6
- name: Run scenario
run: ./tests/e2e/scenarios/${{ matrix.scenario }}/run.sh
# A single runner runs every scenario sequentially. Docker caches the
# Traefik/Crowdsec/whoami images locally, so they are pulled only once
# for the whole suite instead of once per scenario. `-k` keeps going
# after a failing scenario so the logs cover all of them, while make
# still exits non-zero if any scenario failed.
- name: Run scenarios
run: make -k e2e
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.scenario }}
path: /tmp/e2e-${{ matrix.scenario }}.log
name: e2e-logs
path: /tmp/e2e-*.log
if-no-files-found: ignore