push to maple-street
This commit is contained in:
@@ -2,13 +2,35 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [main, develop]
|
||||
branches: [master]
|
||||
|
||||
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
|
||||
|
||||
@@ -24,6 +46,12 @@ jobs:
|
||||
- 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
|
||||
|
||||
@@ -33,5 +61,11 @@ jobs:
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user