-
Notifications
You must be signed in to change notification settings - Fork 27
44 lines (42 loc) · 1.12 KB
/
build.yml
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
name: Test
on:
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn --no-transfer-progress package
db-migration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: simplq
POSTGRES_DB: simplq
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 30s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repo code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build project
run: mvn -pl simplq -q install -DskipTests
- name: Run liquibase migration
run: mvn -pl simplq -q liquibase:update -D db.username=simplq -D db.url=jdbc:postgresql://localhost:5432/simplq