Skip to content

temp

temp #271

Workflow file for this run

name: CI
on: [pull_request, push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.8
- name: Install dependencies
run: bun install
- name: Create .env file for local DB
run: |
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/testdb" > apps/backend/.env
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/testdb" > apps/backend/.env.test
- name: Set up db
run: cd apps/backend && bun run db:push
- name: Wait for PostgreSQL
run: |
until pg_isready -h localhost -p 5432 -U postgres; do
echo "Waiting for PostgreSQL..."
sleep 1
done
- name: Lint code
run: bun run lint
- name: Run tests
run: bun run test