Skip to content

packages

packages #8

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: nullpass_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
DATABASE_URL: postgresql://test:test@localhost:5432/nullpass_test?schema=public
NODE_ENV: test
JWT_SECRET: test
JWT_EXPIRES_IN: 7d
ALLOWED_ORIGINS: http://localhost:3000
AUTH_DOMAIN: auth.test.test
PORT: 3000
SESSION_EXPIRES_DAYS: 7
LOG_LEVEL: error
ARCJET_KEY: ajkey_test
ARCJET_SHIELD_MODE: dry-run
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate Prisma Client
run: npx prisma generate
- name: Setup database schema
run: npx prisma db push --skip-generate --accept-data-loss
- name: Run tests
run: npm test
- name: Build project
run: npm run build
env:
SKIP_ENV_VALIDATION: true