-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 2.15 KB
/
java-tests.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Run java tests
on:
# this workflow is only called by others, won't be executed on itself
workflow_call:
jobs:
run-tests:
name: Run java tests
# These must run on ubuntu 20.04 or older.
# The MS SQL server used by jore4-jore3-importer,
# does not run on Linux kernels newer than 6.6.x.
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Start e2e env
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v8
with:
custom_docker_compose: ./docker/docker-compose.custom.yml
start_jore3_importer: "true"
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
java-package: jdk
architecture: x64
distribution: temurin
cache: maven
- name: Verify whether test mssql db is up
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
env:
SA_PASSWORD: "P@ssw0rd"
with:
command:
'sqlcmd -S 127.0.0.1 -U sa -P "$SA_PASSWORD" -d master -Q "SELECT
''OK'';"'
# it may take a while for the database to start
retries: 50
- name: Verify whether test postgresql db is up
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
with:
# testing whether tcp port 17000 responds
command: "pg_isready -h localhost -p 17000"
- name: Verify whether jore4 db is up
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
with:
# testing whether tcp port 6432 responds
command: "pg_isready -h localhost -p 6432"
- name: Verify that Hasura migrations have been run
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
with:
command: "curl --fail http://localhost:3201/healthz --output /dev/null
--silent"
# It may take a while before migrations are run
retries: 100
- name: Run tests and try building a package
run: mvn --batch-mode clean verify -Pci