Triple cleanup, landed together because they share the same cleanup branch intent and touch non-overlapping trees. 1. 38× tracked .playwright-mcp/*.yml stage-deleted MCP session recordings that had been inadvertently committed. .gitignore already covers .playwright-mcp/ (post-audit J2 block added ind12b901de). Working tree copies removed separately. 2. 19× disabled CI workflows moved to docs/archive/workflows/ Legacy .yml.disabled files in .github/workflows/ were 1676 LOC of dead config (backend-ci, cd, staging-validation, accessibility, chromatic, visual-regression, storybook-audit, contract-testing, zap-dast, container-scan, semgrep, sast, mutation-testing, rust-mutation, load-test-nightly, flaky-report, openapi-lint, commitlint, performance). Preserved in docs/archive/workflows/ for historical reference; `.github/workflows/` now only lists the 5 actually-running pipelines. 3. Orphan code removed (0 consumers confirmed via grep) - veza-backend-api/internal/repository/user_repository.go In-memory UserRepository mock, never imported anywhere. - proto/chat/chat.proto Chat server Rust deleted 2026-02-22 (commit279a10d31); proto file was orphan spec. Chat lives 100% in Go backend now. - veza-common/src/types/chat.rs (Conversation, Message, MessageType, Attachment, Reaction) - veza-common/src/types/websocket.rs (WebSocketMessage, PresenceStatus, CallType — depended on chat::MessageType) - veza-common/src/types/mod.rs updated: removed `pub mod chat;`, `pub mod websocket;`, and their re-exports. Only `veza_common::logging` is consumed by veza-stream-server (verified with `grep -r "veza_common::"`). `cargo check` on veza-common passes post-removal. Refs: AUDIT_REPORT.md §8.2 "Code mort / orphelin" + §9.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
101 lines
3.3 KiB
Text
101 lines
3.3 KiB
Text
name: Contract Testing (Schemathesis)
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "veza-backend-api/**.go"
|
|
- "veza-backend-api/openapi.yaml"
|
|
|
|
env:
|
|
GIT_SSL_NO_VERIFY: "true"
|
|
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
|
|
|
jobs:
|
|
contract-test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: veza_test
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- 6379:6379
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
env:
|
|
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/veza_test?sslmode=disable
|
|
REDIS_URL: redis://localhost:6379
|
|
JWT_SECRET: test-jwt-secret-for-ci
|
|
APP_ENV: test
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: "1.24"
|
|
cache: true
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install schemathesis
|
|
run: pip install schemathesis
|
|
|
|
- name: Download Go deps
|
|
run: cd veza-backend-api && go mod download
|
|
|
|
- name: Run migrations
|
|
run: cd veza-backend-api && go run cmd/migrate_tool/main.go
|
|
continue-on-error: true
|
|
|
|
- name: Start backend API
|
|
run: |
|
|
cd veza-backend-api && go run cmd/api/main.go &
|
|
# Wait for API to be ready
|
|
for i in $(seq 1 30); do
|
|
if curl -sf http://localhost:18080/api/v1/health > /dev/null 2>&1; then
|
|
echo "API is ready"
|
|
break
|
|
fi
|
|
echo "Waiting for API... ($i/30)"
|
|
sleep 2
|
|
done
|
|
|
|
- name: Run schemathesis contract tests
|
|
run: >
|
|
st run
|
|
--checks all
|
|
veza-backend-api/openapi.yaml
|
|
--base-url http://localhost:18080
|
|
--hypothesis-max-examples=50
|
|
--request-timeout=10000
|
|
continue-on-error: true
|
|
|
|
- name: Upload schemathesis report
|
|
if: always()
|
|
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
|
with:
|
|
name: schemathesis-report
|
|
path: .schemathesis/
|
|
retention-days: 14
|