Skip to content

save the research on auth implementation options. We decided on Clerk. #3

save the research on auth implementation options. We decided on Clerk.

save the research on auth implementation options. We decided on Clerk. #3

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
NODE_VERSION: '20'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: TypeScript check
run: npm run typecheck
test:
name: Unit Tests
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:coverage
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage/lcov.info
fail_ci_if_error: false
e2e:
name: E2E Tests
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: caseradar_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Setup database
run: npx prisma db push
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/caseradar_test
DIRECT_URL: postgresql://postgres:postgres@localhost:5432/caseradar_test
- name: Build
run: npm run build
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/caseradar_test
- name: Run E2E tests
run: npm run test:e2e
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/caseradar_test
DIRECT_URL: postgresql://postgres:postgres@localhost:5432/caseradar_test
NEXT_PUBLIC_APP_URL: http://localhost:3000
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 7
build:
name: Build
runs-on: ubuntu-latest
needs: [test, e2e]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
# Provide placeholder values for build
DATABASE_URL: postgresql://localhost:5432/placeholder
DIRECT_URL: postgresql://localhost:5432/placeholder