Skip to content

chore(test): reduce test runtime log noise (dotenv, pino, prisma) #67

chore(test): reduce test runtime log noise (dotenv, pino, prisma)

chore(test): reduce test runtime log noise (dotenv, pino, prisma) #67

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: auth_user
POSTGRES_PASSWORD: auth_password
POSTGRES_DB: auth_api
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U auth_user -d auth_api"
--health-interval=5s
--health-timeout=5s
--health-retries=5
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd="redis-cli ping"
--health-interval=5s
--health-timeout=5s
--health-retries=10
env:
DATABASE_URL: postgresql://auth_user:auth_password@localhost:5432/auth_api
JWT_SECRET: test-secret
NODE_ENV: test
REDIS_URL: redis://localhost:6379
RATE_LIMIT_WINDOW_MS: 60000
RATE_LIMIT_MAX_REQUESTS: 100
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests with coverage
run: npm run test:vitest:coverage