Skip to content

Workflow file for this run

name: Run Performance Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# - name: Start an OpenMRS instance
# run: docker-compose -f src/test/resources/docker-compose.yml up -d
- name: Set up Java
uses: actions/setup-java@v4
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@v4
with:
name: report
path: target/gatling
retention-days: 30
# Publish the report to GH pages
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit the report to the report branch
run: |
chmod +x commit-report.sh
./commit-report.sh
- name: Push changes
run: |
git push origin report