Skip to content

Commit

Permalink
Add runner information to the report
Browse files Browse the repository at this point in the history
  • Loading branch information
jayasanka-sack committed Jul 22, 2024
1 parent b9e5b32 commit f396adc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/run-tests-on-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,25 @@ jobs:
- 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: Get System Information
run: |
# Get RAM information
total_ram=$(free -h | grep Mem | awk '{print $2}')
# Get number of CPUs
num_cpus=$(nproc)
# Get disk space information
total_disk=$(df -h / | grep / | awk '{print $2}')
# Format the description
description="Executed on a GitHub Actions runner with ${total_ram} RAM, ${num_cpus}CPUs, and ${total_disk} disk space."
# Set the description as an environment variable
echo "GATLING_RUN_DESCRIPTION=${description}" >> $GITHUB_ENV
- name: Run performance tests
run: ./mvnw gatling:test
run: ./mvnw gatling:test -Dgatling.runDescription="${{ env.GATLING_RUN_DESCRIPTION }}"

- name: Stop the OpenMRS instance
if: '!cancelled()'
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This repository contains performance testing scripts and configurations for OpenMRS using Gatling.

The latest report can be found at [openmrs.github.io/openmrs-contrib-performance-test](https://openmrs.github.io/openmrs-contrib-performance-test/)

## Table of Contents
- [Introduction](#introduction)
- [Getting Started](#getting-started)
Expand Down

0 comments on commit f396adc

Please sign in to comment.