-
Notifications
You must be signed in to change notification settings - Fork 111
65 lines (61 loc) · 1.87 KB
/
main.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: Build with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest ]
java-version: [ 8 ]
runs-on: ${{ matrix.platform }}
env:
PLATFORM: ${{ matrix.platform }}
JAVA_VERSION: ${{ matrix.java-version }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: Build with Maven
id: build_with_maven
run: |
mvn verify --batch-mode -P integration-test --file pom.xml
- uses: actions/upload-artifact@v3
with:
name: build_artifact
path: ${{ github.workspace }}/omod/target
- name: Send data to Codecov
uses: codecov/codecov-action@v1
with:
env_vars: PLATFORM, JAVA_VERSION
test:
name: Run e2e tests
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- uses: actions/download-artifact@v3
with:
name: build_artifact
path: ${{ github.workspace }}/omod/target
- name: run db and web containers
run: |
docker-compose -f docker/docker-compose-refqa.yml up -d
- name: wait for openmrs instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 1; done
- name: Run End to End tests
run: mvn verify --batch-mode -P e2e-test --file pom.xml
- name: Stop db and web containers
if: always()
run: docker-compose -f "docker/docker-compose-refqa.yml" down