Repository navigation
test: the e2e assertions name the namespace they are about #254
Workflow file for this run
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
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| secret-scan: | |
| name: Secret scan (gitleaks) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run gitleaks over full history | |
| run: | | |
| docker run --rm -v "$PWD:/repo" --entrypoint sh \ | |
| ghcr.io/gitleaks/gitleaks:latest \ | |
| -c 'git config --global --add safe.directory /repo && | |
| gitleaks detect --source /repo --no-banner --redact' | |
| build-test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - run: go build ./... | |
| - run: go test -race ./... | |
| # The e2e tests are behind a build tag and so are never compiled by the | |
| # run above; type-check them here so a changed signature cannot rot there | |
| # unnoticed. They still only execute against a kind cluster. | |
| - run: go vet -tags e2e ./... | |
| # The chart is the only installer, so `helm lint` runs on every profile a | |
| # customer can choose. The rendered output is asserted by the Go tests | |
| # above; this is the CLI's own opinion of the chart (ADR 0036). | |
| - run: make chart-lint | |
| # Reachability, not the module graph: this fails only on vulnerabilities | |
| # the code actually calls, standard library included (ADR 0038). | |
| - run: make vulncheck | |
| lint: | |
| name: Lint (golangci-lint) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.11.4 | |
| proto: | |
| name: Payload schema (buf) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # buf compares against main out of this checkout, so it needs one. | |
| fetch-depth: 0 | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| version: 1.72.0 | |
| - run: buf lint | |
| # Field numbers are never reused and removed ones stay reserved. This is | |
| # what enforces that, and with it the N-2 compatibility window in | |
| # `backend-requirements.md` §6 — not review vigilance (ADR 0074). | |
| - name: Check the schema against main | |
| run: | | |
| if git ls-tree -r --name-only origin/main -- proto | grep -q .; then | |
| buf breaking --against '.git#ref=origin/main' | |
| else | |
| echo "main carries no schema: this change is the one introducing it." | |
| fi |