2026-09-25 09:55:44 +07:00

50 lines
1.4 KiB
YAML

name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
checks:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: ai_platform_test
POSTGRES_PASSWORD: ci-only-password
POSTGRES_DB: ai_platform_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U ai_platform_test -d ai_platform_test"
--health-interval 5s
--health-timeout 5s
--health-retries 12
env:
AI_PLATFORM_DATABASE_URL: postgresql+asyncpg://ai_platform_test:ci-only-password@localhost:5432/ai_platform_test
AI_PLATFORM_ENVIRONMENT: test
AI_PLATFORM_TENANT_PROVISIONING_SECRET: ci-only-provisioner-value
BACKEND_INTERNAL_URL: http://127.0.0.1:8000
WEB_ORIGIN: http://localhost:3000
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: uv.lock
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
- run: uv sync --locked --all-groups
- working-directory: apps/web
run: bun install --frozen-lockfile
- run: make migrate
- run: make check
- run: docker build -f Dockerfile.backend -t ai-platform-backend:ci .
- run: docker build -f apps/web/Dockerfile -t ai-platform-web:ci .