-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (54 loc) · 1.33 KB
/
ci.yml
File metadata and controls
63 lines (54 loc) · 1.33 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
pull_request:
push:
branches:
- main
- master
jobs:
verify:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- '22.13.0'
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: locations_api
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd="pg_isready -U postgres -d locations_api"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 5432:5432
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/locations_api
NODE_ENV: test
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.7.0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint, typecheck, and build
run: pnpm build:ci
- name: Run migrations
run: pnpm db:migrate
- name: Seed database
run: pnpm db:seed
- name: Run tests
run: pnpm test