initial commit
This commit is contained in:
commit
88c14b627e
224 files changed
+17204
No files matched your search
@@ -0,0 +1,238 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
merge_group:
|
||||
types:
|
||||
- checks_requested
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
api:
|
||||
name: API contracts
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version-file: frontend/.node-version
|
||||
cache: npm
|
||||
cache-dependency-path: api/package-lock.json
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
||||
with:
|
||||
go-version-file: backend/go.mod
|
||||
cache: true
|
||||
cache-dependency-path: backend/go.sum
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||
with:
|
||||
python-version-file: ml/.python-version
|
||||
cache: pip
|
||||
cache-dependency-path: scripts/requirements-codegen.txt
|
||||
- name: Install API tooling
|
||||
run: make -C api install
|
||||
- name: Check API formatting and compatibility
|
||||
run: make -C api fmt-check verify
|
||||
- name: Check compatibility with the pull request base
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
API_BASE_REF: ${{ github.event.pull_request.base.sha }}
|
||||
run: make -C api check-compat
|
||||
|
||||
backend:
|
||||
name: Go backend
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
||||
with:
|
||||
go-version-file: backend/go.mod
|
||||
cache: true
|
||||
cache-dependency-path: backend/go.sum
|
||||
- name: Install Go tools
|
||||
run: make -C backend deps
|
||||
- name: Check backend
|
||||
run: make -C backend check
|
||||
- name: Run backend race tests
|
||||
run: make -C backend test-race
|
||||
- name: Run PostgreSQL integration tests
|
||||
run: make -C backend test-int
|
||||
|
||||
frontend:
|
||||
name: Frontend
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version-file: frontend/.node-version
|
||||
- name: Install declared pnpm
|
||||
run: npm install --global "$(node -p "require('./frontend/package.json').packageManager")"
|
||||
- name: Cache pnpm store
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: ~/.local/share/pnpm/store
|
||||
key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-
|
||||
- name: Install frontend dependencies
|
||||
run: make -C frontend install
|
||||
- name: Check frontend
|
||||
run: make -C frontend check
|
||||
|
||||
ml:
|
||||
name: ML service
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||
with:
|
||||
python-version-file: ml/.python-version
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
||||
with:
|
||||
version: 0.12.22
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ml/uv.lock
|
||||
- name: Install ML dependencies
|
||||
run: make -C ml install
|
||||
- name: Check ML service and contract
|
||||
run: make -C ml verify
|
||||
|
||||
codegen:
|
||||
name: Generation and drift
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
|
||||
with:
|
||||
go-version-file: backend/go.mod
|
||||
cache: true
|
||||
cache-dependency-path: backend/go.sum
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version-file: frontend/.node-version
|
||||
cache: npm
|
||||
cache-dependency-path: api/package-lock.json
|
||||
- name: Install declared pnpm
|
||||
run: npm install --global "$(node -p "require('./frontend/package.json').packageManager")"
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||
with:
|
||||
python-version-file: ml/.python-version
|
||||
cache: pip
|
||||
cache-dependency-path: scripts/requirements-codegen.txt
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
||||
with:
|
||||
version: 0.12.22
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ml/uv.lock
|
||||
- name: Install project dependencies
|
||||
run: make install
|
||||
- name: Regenerate and check drift
|
||||
run: make generate check-generated
|
||||
|
||||
infrastructure:
|
||||
name: Infrastructure configuration
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Check Compose files
|
||||
run: make -C deploy check
|
||||
- name: Check observability files
|
||||
run: make -C observability check
|
||||
- name: Build the separate ML image
|
||||
run: make -C deploy ml-build
|
||||
|
||||
smoke:
|
||||
name: Isolated technical smoke
|
||||
needs:
|
||||
- backend
|
||||
- frontend
|
||||
- infrastructure
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 35
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Build and check technical health routes
|
||||
run: make -C deploy smoke
|
||||
|
||||
aggregate:
|
||||
name: Required CI result
|
||||
if: always()
|
||||
needs:
|
||||
- api
|
||||
- backend
|
||||
- frontend
|
||||
- ml
|
||||
- codegen
|
||||
- infrastructure
|
||||
- smoke
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Require every CI job to pass
|
||||
env:
|
||||
API_RESULT: ${{ needs.api.result }}
|
||||
BACKEND_RESULT: ${{ needs.backend.result }}
|
||||
FRONTEND_RESULT: ${{ needs.frontend.result }}
|
||||
ML_RESULT: ${{ needs.ml.result }}
|
||||
CODEGEN_RESULT: ${{ needs.codegen.result }}
|
||||
INFRASTRUCTURE_RESULT: ${{ needs.infrastructure.result }}
|
||||
SMOKE_RESULT: ${{ needs.smoke.result }}
|
||||
run: |
|
||||
printf 'api=%s backend=%s frontend=%s ml=%s codegen=%s infrastructure=%s smoke=%s\n' \
|
||||
"$API_RESULT" "$BACKEND_RESULT" "$FRONTEND_RESULT" "$ML_RESULT" \
|
||||
"$CODEGEN_RESULT" "$INFRASTRUCTURE_RESULT" "$SMOKE_RESULT"
|
||||
test "$API_RESULT" = success
|
||||
test "$BACKEND_RESULT" = success
|
||||
test "$FRONTEND_RESULT" = success
|
||||
test "$ML_RESULT" = success
|
||||
test "$CODEGEN_RESULT" = success
|
||||
test "$INFRASTRUCTURE_RESULT" = success
|
||||
test "$SMOKE_RESULT" = success
|
||||
@@ -0,0 +1,49 @@
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
merge_group:
|
||||
types:
|
||||
- checks_requested
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: Documentation checks
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||
with:
|
||||
python-version-file: ml/.python-version
|
||||
- name: Check documentation
|
||||
run: make docs-check
|
||||
|
||||
aggregate:
|
||||
name: Required documentation result
|
||||
if: always()
|
||||
needs:
|
||||
- docs
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Require documentation checks to pass
|
||||
env:
|
||||
DOCS_RESULT: ${{ needs.docs.result }}
|
||||
run: |
|
||||
printf 'docs=%s\n' "$DOCS_RESULT"
|
||||
test "$DOCS_RESULT" = success
|
||||
Reference in new issue
Block a user