-
-
Notifications
You must be signed in to change notification settings - Fork 354
36 lines (33 loc) · 872 Bytes
/
run-server-tests.yml
File metadata and controls
36 lines (33 loc) · 872 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
name: run-server-tests
run-name: Enforce tests pass on committed files
on:
workflow_dispatch:
#pull_request:
jobs:
run-server-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: cyf
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: cp .env.example .env
- run: npm install
- run: npm run test:server
env:
TEST_DATABASE_URL: postgres://cyf:password@localhost:5432/cyf