Files
ditto.site/.github/workflows/ci.yml
T
2026-06-29 15:11:48 -07:00

39 lines
968 B
YAML

name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ditto_site
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
# DB/queue tests use this instead of an ephemeral instance.
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/ditto_site
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- name: Install Chromium (for capture/browser-gated tests)
run: npx playwright install --with-deps chromium
- run: npm run typecheck
- run: npm test