chore(ci): run the real-core tests in CI

The tests gated on XRAY_E2E_BINARY start the core pinned in go.mod as a
child process and drive its gRPC API: user add and remove, hot apply,
balancer overrides, the REALITY probe and the AmneziaWG relay. No job set
the variable, so they skipped in every run and a green CI had never touched
the core.

`make xray-e2e` builds that core from the module cache and runs every
package holding such a test; the new job fails when one of them still skips
for want of the binary. The reviewer and analyst context files said these
tests never run in CI and now name the job that does.
This commit is contained in:
Sanaei
2026-11-25 11:02:24 +03:30
parent de7ef54739
commit a36858f36c
5 changed files with 35 additions and 6 deletions
+4 -2
View File
@@ -148,6 +148,7 @@ It is paths-filtered, so a docs-only or workflow-only change produces no run.
| `go-test` | `go test -shuffle=on -count=1` over every package except `frontend/node_modules` |
| `race` | the same set under `-race -shuffle=on` |
| `postgres-durable-first` | live PostgreSQL 16: the `PostgresCommitFailure` tests plus `TestHostAutoMigrateCreatesColumns_Postgres` and `TestMigrate_Postgres`. Both steps COUNT passes rather than assert on SKIP, so a renamed or deleted test fails the job |
| `xray-e2e` | `make xray-e2e`: the `XRAY_E2E_BINARY` tests in `internal/xray/`, `internal/web/service/` and `internal/amneziawgnet/` against the core pinned in `go.mod`, run as a real child process. A skip naming the binary fails the job |
| `govulncheck` | known vulnerabilities |
| `golangci` | `golangci-lint` |
| `fuzz-smoke` | 30s each on `FuzzParseLink` and `FuzzDecodeCertPin` |
@@ -155,13 +156,14 @@ It is paths-filtered, so a docs-only or workflow-only change produces no run.
| `frontend` | lint, format:check, typecheck, `npm test` (Vitest + headless-Chromium Storybook), build, build-storybook, `npm audit` |
**What CI does NOT prove.** These test families `t.Skip` unless an environment
variable is set, and CI sets only the PostgreSQL ones above:
variable is set. CI sets the PostgreSQL ones in `postgres-durable-first` and
`XRAY_E2E_BINARY` in `xray-e2e` only, so every other job still skips them:
| gate | covers |
| --- | --- |
| `XUI_TEST_PG_DSN` | PostgreSQL-specific paths |
| `XUI_DB_TYPE` + `XUI_DB_DSN` | dialect-dependent behaviour |
| `XRAY_E2E_BINARY` | the Xray gRPC end-to-end tests in `internal/xray/` |
| `XRAY_E2E_BINARY` | the real-core tests: Xray gRPC API, hot apply, balancer overrides, the AmneziaWG relay |
| `XUI_SCALE_TEST` | scale tests in `internal/sub/`, `internal/web/job/`, `internal/web/service/` |
Mutation testing (`mutation.yml`) runs nightly and never on a pull request, so a
+16
View File
@@ -282,6 +282,22 @@ jobs:
make node-e2e 2>&1 | tee /tmp/node-e2e.log
if grep -q -- '--- SKIP' /tmp/node-e2e.log; then echo "node-e2e skipped"; exit 1; fi
# The core pinned in go.mod as a real child process, driven over its gRPC API.
# A skip naming the binary means it was never handed over, so it fails the job.
xray-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: Real core end to end
run: |
set -o pipefail
make xray-e2e 2>&1 | tee /tmp/xray-e2e.log
if grep -q -- '_test.go:[0-9]*: .*XRAY_E2E_BINARY' /tmp/xray-e2e.log; then echo "a real-core test skipped"; exit 1; fi
# Brief native-fuzz smoke on the security-/parser-critical decoders. Each runs the
# generated corpus plus 30s of exploration; a crash here is a real input-handling bug.
fuzz-smoke: