-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.09 KB
/
run-tests-on-gh.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
name: Run Performance Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Start an OpenMRS instance
run: docker-compose -f src/main/resources/docker-compose.yml up -d
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '15'
- name: Install dependencies
run: ./mvnw install -DskipTests
- name: Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Run performance tests
run: ./mvnw gatling:test
- name: Stop the OpenMRS instance
if: '!cancelled()'
run: docker stop $(docker ps -a -q)
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: gatling-results
path: target/gatling