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: bun run db:push - 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