-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (74 loc) · 2.2 KB
/
pr.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Pull Request Build
on:
push:
branches-ignore:
- "main"
- "alpha"
- "beta"
paths-ignore:
- "docs/**"
jobs:
pr-build:
runs-on: ubuntu-latest
# based on: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers#running-jobs-directly-on-the-runner-machine
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
# 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
# pace database for integration test
postgres_pace:
image: postgres
env:
POSTGRES_USER: pace
POSTGRES_PASSWORD: pace
PGDATA: /data/postgres
options: >-
--health-cmd pg_isready
ports:
- "5433:5432"
# public.demo database for integration test
postgres_processing_platform:
image: postgres
env:
POSTGRES_USER: standalone
POSTGRES_PASSWORD: standalone
POSTGRES_DB: standalone
PGDATA: /data/postgres
options: >-
--health-cmd pg_isready
ports:
- "5431:5432"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: install postgresql-client
run: sudo apt update -y && sudo apt install -y postgresql-client
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build
run: ./gradlew build -PciBuild
- name: copy app.jar to integration-test directory
run: cp server/build/libs/app.jar integration-test/
- name: executing integration test
id: integration-test
working-directory: integration-test/
run: |
chmod go-rw pgpass
make pace all kill-pace
- name: print PACE logs
if: always() && steps.integration-test.outcome == 'failure'
working-directory: integration-test/
run: |
cat pace.log