Skip to content

Fix Sort By Oldest

Fix Sort By Oldest #68

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
services:
postgres_test:
image: postgres:15
ports:
- 5433:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
options: >-
--health-cmd "pg_isready -U postgres -d test"
--health-interval 10s
--health-timeout 5s
--health-retries 3
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 21
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Migrate and seed DB
working-directory: ./backend
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/test
run: pnpm run db:migrate
- name: Seed DB
working-directory: ./backend
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/test
run: bun ./test/setup/seed-test.ts
- name: Run tests
run: pnpm test:ci
env:
NODE_ENV: test
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/test