Files
esports/.github/workflows/ci.yml
2026-03-13 18:18:51 +01:00

65 lines
1.3 KiB
YAML

name: CI
on:
push:
branches: [dev, staging, prod]
pull_request:
branches: [dev, staging, prod]
jobs:
ci:
name: Lint, Check, Build & Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: esports_test
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U test"
--health-interval=5s
--health-timeout=5s
--health-retries=5
env:
DATABASE_URL: postgres://test:test@localhost:5432/esports_test
BETTER_AUTH_SECRET: ci-test-secret
OSU_CLIENT_ID: '0'
OSU_CLIENT_SECRET: ci-test-secret
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Type check
run: bun run check
- name: Push DB schema
run: bunx drizzle-kit push --force
- name: Build
run: bun run build
- name: Install Playwright browsers
run: bunx playwright install --with-deps chromium
- name: Unit tests
run: bun run test:unit --run
- name: E2E tests
run: bun run test:e2e