Skip to content

Bump next from 15.5.7 to 15.5.9 in the npm_and_yarn group across 1 directory #148

Bump next from 15.5.7 to 15.5.9 in the npm_and_yarn group across 1 directory

Bump next from 15.5.7 to 15.5.9 in the npm_and_yarn group across 1 directory #148

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_USER: rtap
POSTGRES_PASSWORD: rtap
POSTGRES_DB: rtap_ci
options: >-
--health-cmd "pg_isready -U rtap -d rtap_ci"
--health-interval 5s
--health-timeout 5s
--health-retries 5
env:
AUTH_SECRET: dummy_auth_secret_abcdefghijklmnopqrstuvwxyz_123456
DATABASE_URL: postgresql://rtap:rtap@localhost:5432/rtap_ci
TEST_DATABASE_URL: postgresql://rtap:rtap@localhost:5432/rtap_ci_test
NEXT_TELEMETRY_DISABLED: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install deps
run: npm ci
- name: Install PostgreSQL client
run: sudo apt-get update && sudo apt-get install -y postgresql-client
- name: Wait for database
run: |
for i in {1..30}; do
PGPASSWORD=rtap pg_isready -h localhost -p 5432 -U rtap -d rtap_ci && exit 0
echo "Postgres not ready yet, retry $i/30..."
sleep 1
done
echo "Postgres did not become ready in time" >&2
exit 1
- name: Prepare shadow database
run: |
PGPASSWORD=rtap psql -h localhost -U rtap -d postgres -c "DROP DATABASE IF EXISTS rtap_ci_shadow"
PGPASSWORD=rtap psql -h localhost -U rtap -d postgres -c "CREATE DATABASE rtap_ci_shadow"
- name: Apply migrations
run: npm run db:deploy
- name: Check for schema drift
env:
SHADOW_DATABASE_URL: postgresql://rtap:rtap@localhost:5432/rtap_ci_shadow
run: npx prisma migrate diff --from-migrations prisma/migrations --to-schema-datamodel prisma/schema.prisma --exit-code --shadow-database-url "$SHADOW_DATABASE_URL"
- name: Lint + Typecheck
env:
NODE_ENV: test
run: npm run check
- name: Tests with coverage
env:
NODE_ENV: test
run: npm run test:coverage
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage
- name: Build
env:
NODE_ENV: production
run: npm run build