-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (60 loc) · 1.65 KB
/
integration_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
66
67
name: Integration tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 0 * * *"
jobs:
build:
strategy:
fail-fast: true
runs-on: ubuntu-latest
env:
SSL_ENGINE: off
SERVER_NAME: localhost
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ADMIN_ELIXIR_ID: ${{ secrets.ADMIN_ELIXIR_ID }}
ELIXIR_AAI_CLIENT_ID: ${{ secrets.ELIXIR_AAI_CLIENT_ID }}
ELIXIR_AAI_CLIENT_SECRET: ${{ secrets.ELIXIR_AAI_CLIENT_SECRET }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 13
uses: actions/setup-java@v1
with:
java-version: 13
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build container
run: docker build -t elixiroslo/trackfind:latest .
- name: Run Docker Compose
run: docker-compose up -d
- name: Process list
run: docker-compose ps
- name: Wait for containers to start
run: |
RETRY_TIMES=0
for p in db gsuite augmentation apache trackfind
do
until docker ps -f name=$p --format {{.Status}} | grep "Up "
do echo "waiting for $p to become ready"
RETRY_TIMES=$((RETRY_TIMES+1));
if [ $RETRY_TIMES -eq 30 ]; then exit 1; fi
sleep 10;
done
done
sleep 60
- name: Run integration tests
run: |
cd int-tests
mvn test -B -ntp
- name: Logs
if: failure()
run: docker-compose logs