@@ -32,43 +32,48 @@ jobs:
3232 runs-on : ubuntu-latest
3333 steps :
3434 - name : Checkout code
35- uses : actions/checkout@v3
35+ uses : actions/checkout@v4
3636
37- - name : Install pnpm with npm
38- run : npm install -g pnpm
37+ - name : Setup Bun
38+ uses : oven-sh/setup-bun@v2
39+ with :
40+ bun-version : 1.3.2
3941
4042 - name : Create Directory
4143 run : mkdir -p ./packages/api-main/data/postgres_data
4244
43- - name : Setup Node.js
44- uses : actions/setup-node@v4
45- with :
46- node-version-file : .nvmrc
47- cache : pnpm
48-
49- - name : Install dependencies with pnpm
50- run : pnpm install
45+ - name : Install dependencies
46+ run : bun install
5147
5248 - name : Set up Docker
5349 uses : docker/setup-docker-action@v4
5450
55- - name : Build API Types
56- working-directory : ./packages/lib-api-types
57- run : pnpm build
58-
5951 - name : Run Docker Compose Up
6052 working-directory : ./packages/api-main
6153 run : docker compose -f ./docker-compose-github.yml up --build -d --wait --wait-timeout 30
6254
63- - name : Push database migrations
55+ - name : Wait for database to be ready
6456 working-directory : ./packages/api-main
6557 run : |
66- cp .env.example .env
67- pnpm db:push:force
58+ until docker exec postgres_db pg_isready -U default; do
59+ sleep 1
60+ done
61+
62+ - name : Push database migrations
63+ working-directory : ./packages/api-main
64+ run : bun run db:push:force
65+ env :
66+ PG_URI : postgresql://default:password@localhost:5432/postgres
6867
69- - name : Run tests with pnpm
68+ - name : Run tests
7069 working-directory : ./packages/api-main
71- run : pnpm test
70+ run : bun run test
71+ env :
72+ NODE_OPTIONS : --experimental-global-webcrypto
73+ PG_URI : postgresql://default:password@localhost:5432/postgres
74+ JWT : default_jwt_secret
75+ JWT_STRICTNESS : lax
76+ AUTH : whatever
7277
7378 build :
7479 needs : [detect-changes, test]
@@ -114,7 +119,7 @@ jobs:
114119
115120 notify :
116121 needs : [build]
117- if : failure()
122+ if : failure() && needs.build.result != 'skipped'
118123 runs-on : ubuntu-latest
119124 steps :
120125 - uses : appleboy/telegram-action@v1.0.1
0 commit comments