Update the script and skip docker temporarily #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
if: github.event_name == 'push' | |
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 | |
if: github.event_name == 'push' | |
run: | | |
chmod +x commit-report.sh | |
./commit-report.sh | |
- name: Push changes | |
if: github.event_name == 'push' | |
run: | | |
git push origin main:remote -f |