deadhead-space-freight-tycoon/.gitea/workflows/ci.yml

39 lines
1.1 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
services:
# Test database for server integration tests.
postgres:
image: postgres:18
env:
POSTGRES_USER: deadhead
POSTGRES_PASSWORD: deadhead
POSTGRES_DB: deadhead_test
options: >-
--health-cmd "pg_isready -U deadhead -d deadhead_test"
--health-interval 2s
--health-timeout 5s
--health-retries 30
env:
TEST_DATABASE_URL: postgres://deadhead:deadhead@postgres:5432/deadhead_test
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm lint
- run: pnpm coverage
# Browser tests against the web build alone (PWA, and the game on the device, CR-014).
- run: pnpm --filter @deadhead/web build:e2e
- run: pnpm --filter @deadhead/web exec playwright install --with-deps chromium
- run: pnpm --filter @deadhead/web e2e