-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 964 Bytes
/
test.yml
File metadata and controls
45 lines (42 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Tests / Backend
on:
pull_request:
branches:
- main
jobs:
postgres-container:
runs-on: ubuntu-latest
env:
PGUSER: postgres
PGPASSWORD: password
PGHOST: db
PGDATABASE: safeskiesdb
PGPORT: 5432
HUSKY: 0
container: node:22.14-bookworm-slim
services:
db:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: safeskiesdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.14.0
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run migrations
run: npm run migrate:up
- name: Run tests
run: npm run test