Files
glenloch-media/.github/workflows/ci.yml
T
bhursey 3fd8ffb0f9
CI / build (push) Has been cancelled
ci: target the main branch
The repository moved from master to main, but the workflow still only triggered on master, so pushes and pull requests ran no CI. Update the trigger and the current-state docs to match.
2026-11-20 05:17:13 +00:00

72 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: media
POSTGRES_PASSWORD: media
POSTGRES_DB: media
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U media"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgres://media:media@localhost:5432/media
NEXTAUTH_SECRET: ci-secret-not-for-production
NEXTAUTH_URL: http://localhost:3000
AUTO_ACTIVATE_NEW_USERS: "true"
MAGIC_LINK_DEV_TRANSPORT: "true"
ALLOW_DEV_RESET: "true"
CRON_SECRET: ci-cron-secret
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install
run: pnpm install --frozen-lockfile
- name: Install media tools
run: sudo apt-get update && sudo apt-get install -y postgresql-client unzip ffmpeg
- name: Migration drift check
run: pnpm db:generate && git diff --exit-code -- drizzle
- name: Typecheck
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
- name: Apply migrations
run: pnpm db:migrate
- name: End-to-end
run: pnpm test:e2e
- name: Build
run: pnpm build