mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 03:28:59 +02:00
Revert the mock module back to go 1.22 and make the e2e workflow read the Go version from go.mod (go-version-file) instead of hardcoding 1.23. Rationale: the plugin is interpreted by yaegi, and even Traefik v3.7.1 ships yaegi v0.16.1 (Go 1.22), so the project stays on 1.22. The earlier bump to 1.23 is dropped (plugin go.mod stays 1.22, see #330 for the Renovate cap + CI pin). Mock + all six scenarios verified on Go 1.22. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: E2E
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: e2e-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
e2e:
|
|
name: e2e (binary + mock LAPI)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
# Track go.mod (Go 1.22) — the plugin's yaegi-bound floor. Keeps the
|
|
# single source of truth and builds the mock on the supported version.
|
|
go-version-file: go.mod
|
|
# CI runs the binary/mock suite only: Traefik as a downloaded binary +
|
|
# a small LAPI mock (no Docker, no real Crowdsec). It validates the
|
|
# plugin's own behaviour. Crowdsec / AppSec correctness is upstream's
|
|
# responsibility, so those are intentionally out of scope here. The
|
|
# Docker suite (tests/e2e/scenarios) stays available for local debugging.
|
|
# `-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 mock scenarios
|
|
run: make -k e2e_mock
|
|
- name: Upload logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: e2e-logs
|
|
path: /tmp/e2e-mock-*.log
|
|
if-no-files-found: ignore
|