106 lines
3.1 KiB
YAML
106 lines
3.1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
openapi:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
- shell: pwsh
|
|
run: ./scripts/verify-openapi.ps1
|
|
|
|
proto:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- shell: pwsh
|
|
run: ./scripts/verify-proto.ps1
|
|
|
|
deployment:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PROXY_POOL_GATEWAY_USERNAME: ci-gateway-user
|
|
PROXY_POOL_GATEWAY_PASSWORD: ci-gateway-password
|
|
PROXY_POOL_EXTRACT_TOKEN: ci-extract-token
|
|
PROXY_POOL_ADMIN_TOKEN: ci-admin-token
|
|
PROXY_POOL_CONFIG_FINGERPRINT_KEY: ci-config-fingerprint-key-at-least-32-bytes
|
|
PROXY_POOL_POSTGRES_URL: postgres://ci:ci@postgres.example:5432/proxy_pool?sslmode=verify-full
|
|
PROXY_POOL_REDIS_URL: rediss://:ci@redis.example:6379/0
|
|
PROVIDER_A_TOKEN: ci-provider-a-token
|
|
PROVIDER_B_TOKEN: ci-provider-b-token
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- name: Render Compose configuration
|
|
run: docker compose -f deploy/docker-compose.yml config --quiet
|
|
- name: Render integration Compose configuration
|
|
run: docker compose -f deploy/docker-compose.test.yml config --quiet
|
|
- name: Validate local Compose configuration
|
|
run: go run ./deploy/tools/configcheck deploy/config/local.yaml
|
|
- name: Render Kubernetes base
|
|
run: kubectl kustomize deploy/kubernetes/base > /dev/null
|
|
- name: Render Kubernetes development mTLS overlay
|
|
run: kubectl kustomize deploy/kubernetes/overlays/development-mtls > /dev/null
|
|
- name: Validate development mTLS configuration
|
|
run: go run ./deploy/tools/configcheck deploy/kubernetes/overlays/development-mtls/config.yaml
|
|
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- run: go vet ./...
|
|
- run: go test -timeout 60s ./...
|
|
- run: go build ./...
|
|
|
|
race:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- run: go test -race -timeout 60s ./internal/...
|
|
|
|
integration:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- name: Redis activity contract
|
|
shell: pwsh
|
|
run: ./scripts/test-redis.ps1
|
|
- name: PostgreSQL admin-state contract
|
|
shell: pwsh
|
|
run: ./scripts/test-postgres.ps1
|
|
- name: Controller dual-store bootstrap
|
|
shell: pwsh
|
|
run: ./scripts/test-controller.ps1
|