mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
name: Run Tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_DB: bknd
|
|
ports:
|
|
- 5430:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22.x"
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v1
|
|
with:
|
|
bun-version: "1.3.3"
|
|
|
|
- name: Install dependencies
|
|
working-directory: ./app
|
|
run: bun install #--linker=hoisted
|
|
|
|
- name: Build
|
|
working-directory: ./app
|
|
run: bun run build:ci
|
|
|
|
- name: Run Bun tests
|
|
working-directory: ./app
|
|
run: bun run test:bun
|
|
|
|
- name: Run Node tests
|
|
working-directory: ./app
|
|
run: npm run test:node |