-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.25 KB
/
ci.yml
File metadata and controls
61 lines (50 loc) · 1.25 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
name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 5
postgres:
image: postgres:16-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: psyqueue
POSTGRES_PASSWORD: psyqueue
POSTGRES_DB: psyqueue
options: >-
--health-cmd "pg_isready -U psyqueue"
--health-interval 5s
--health-timeout 3s
--health-retries 5
env:
REDIS_URL: redis://localhost:6379
POSTGRES_URL: postgres://psyqueue:psyqueue@localhost:5432/psyqueue
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm build
- name: Test
run: pnpm test