forked from FlowFuse/flowfuse
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.52 KB
/
test-postgresql.yml
File metadata and controls
59 lines (57 loc) · 1.52 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
name: Backend Tests - postgres
on:
push:
branches: [ main ]
paths:
- 'forge/**'
- 'test/unit/**'
- 'test/system/**'
- 'package.json'
pull_request:
paths:
- 'forge/**'
- 'test/unit/**'
- 'test/system/**'
- 'package.json'
- '.github/workflows/test-postgresql.yml'
jobs:
runner-job:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: secret
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
-m 3GB
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Setup NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Build the forge
run: npm run build
- name: Test the forge (with PostgreSQL)
env:
FF_TEST_DB_POSTGRES: true
FF_TEST_DB_POSTGRES_HOST: localhost
FF_TEST_DB_POSTGRES_PORT: 5432
FF_TEST_DB_POSTGRES_USER: postgres
FF_TEST_DB_POSTGRES_PASSWORD: secret
FF_TEST_DB_POSTGRES_DATABASE: flowforge
NODE_OPTIONS: "--max_old_space_size=4096"
run: npm run test