Skip to content

Commit 1e1fe4d

Browse files
authored
Merge branch 'main' into landing-page
2 parents 79e371e + ded8ac2 commit 1e1fe4d

84 files changed

Lines changed: 2883 additions & 556 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
services:
10+
postgres:
11+
image: postgres:17
12+
ports:
13+
- 5432:5432
14+
env:
15+
POSTGRES_USER: postgres
16+
POSTGRES_PASSWORD: postgres
17+
POSTGRES_DB: testdb
18+
options: >-
19+
--health-cmd pg_isready
20+
--health-interval 10s
21+
--health-timeout 5s
22+
--health-retries 5
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: pnpm/action-setup@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Create .env file for local DB
35+
run: |
36+
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/testdb" > apps/backend/.env
37+
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/testdb" > apps/backend/.env.test
38+
39+
- name: Set up db
40+
run: cd apps/backend && pnpm db:push
41+
42+
- name: Wait for PostgreSQL
43+
run: |
44+
until pg_isready -h localhost -p 5432 -U postgres; do
45+
echo "Waiting for PostgreSQL..."
46+
sleep 1
47+
done
48+
49+
- name: Run tests
50+
run: pnpm test

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ node_modules/
1414
# env
1515
.env
1616
.env.production
17+
.env.test
1718

1819
# logs
1920
logs/
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { env } from "#backend/env";
22
import { defineConfig } from "drizzle-kit";
33

44
export default defineConfig({
5-
dialect: "sqlite",
5+
dialect: "postgresql",
66
schema: "./src/infrastructure/db/schema/*",
77
out: "./drizzle",
88
dbCredentials: {
9-
url: env.DATABASE_URL || "file:./db.sqlite",
9+
url: env.DATABASE_URL,
1010
},
1111
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)