Some checks failed
Veza CI / Backend (Go) (push) Failing after 14m40s
Veza CI / Frontend (Web) (push) Failing after 4m27s
Veza CI / Rust (Stream Server) (push) Failing after 6m24s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 2m46s
Stream Server CI / test (push) Failing after 3m9s
Veza CI / Notify on failure (push) Successful in 5s
- Rewrite ci.yml: replace TMT with direct go test/lint/build commands, remove E2E jobs (need docker compose infra, run locally instead) - Replace third-party actions with CLI equivalents: gitleaks-action → gitleaks CLI, trivy-action → trivy CLI, actions-rust-lang/audit → cargo audit, CodeQL → disabled - Disable 18 non-essential workflows (cloud services, DinD, staging): chromatic, cd, container-scan, zap-dast, visual-regression, mutation-testing, performance, load-test, etc. - Keep 8 core workflows: ci, backend-ci, frontend-ci, rust-ci, stream-ci, security-scan, trivy-fs, go-fuzz Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85 lines
3.1 KiB
Text
85 lines
3.1 KiB
Text
name: Load Tests (Nightly)
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 2 * * *"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
GIT_SSL_NO_VERIFY: "true"
|
|
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
|
|
|
jobs:
|
|
load-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Install k6
|
|
run: |
|
|
sudo gpg -k
|
|
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
|
|
echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
|
|
sudo apt-get update && sudo apt-get install -y k6
|
|
|
|
- name: Start infrastructure
|
|
run: |
|
|
docker compose -f docker compose.yml up -d postgres redis rabbitmq
|
|
sleep 15
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: "1.24"
|
|
cache: true
|
|
|
|
- name: Run migrations
|
|
working-directory: veza-backend-api
|
|
env:
|
|
DATABASE_URL: postgresql://veza:devpassword@localhost:15432/veza?sslmode=disable
|
|
REDIS_URL: redis://localhost:16379
|
|
JWT_SECRET: test-jwt-secret-for-load-test
|
|
APP_ENV: test
|
|
run: |
|
|
go mod download
|
|
go run cmd/migrate_tool/main.go || true
|
|
|
|
- name: Start backend API
|
|
working-directory: veza-backend-api
|
|
env:
|
|
DATABASE_URL: postgresql://veza:devpassword@localhost:15432/veza?sslmode=disable
|
|
REDIS_URL: redis://localhost:16379
|
|
RABBITMQ_URL: amqp://veza:devpassword@localhost:15672/
|
|
JWT_SECRET: test-jwt-secret-for-load-test
|
|
APP_ENV: test
|
|
PORT: 8080
|
|
run: |
|
|
go run cmd/api/main.go &
|
|
sleep 15
|
|
|
|
- name: Wait for backend
|
|
run: |
|
|
for i in 1 2 3 4 5 6 7 8 9 10; do
|
|
if curl -sf http://localhost:8080/health; then
|
|
echo "Backend ready"
|
|
exit 0
|
|
fi
|
|
sleep 3
|
|
done
|
|
echo "Backend not ready"
|
|
exit 1
|
|
|
|
- name: Run smoke load test
|
|
run: k6 run loadtests/smoke.js
|
|
|
|
- name: Run backend load test
|
|
run: |
|
|
k6 run --out json=load-results.json loadtests/backend/full.js || true
|
|
continue-on-error: true
|
|
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
|
with:
|
|
name: load-test-results
|
|
path: load-results.json
|
|
if: always()
|