Skip to content

Adds skeleton performance test framework #16

Adds skeleton performance test framework

Adds skeleton performance test framework #16

name: 📋 Performance Test
on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]
concurrency:
group: preview-${{ github.head_ref }}
cancel-in-progress: true
jobs:
performance-test:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Git clone the repository
uses: actions/checkout@v3
- name: Init
run: |
# Set permissions for checkout.
sudo chown -R 1000:1000 $(pwd)
# Create performance testing results directory.
sudo mkdir -p performance-testing/results
sudo chmod 777 performance-testing/results
- name: 📋 Setup
run: |
OTEL_PHP_AUTOLOAD_ENABLED=false docker compose up -d --wait
docker compose exec php-cli composer install --prefer-dist
docker compose exec php-cli ./vendor/drush/drush/drush si demo_umami -y
- name: K6 - Execute Baseline Performance Test
run: |
bash performance-testing/scripts/k6_run.sh performance-testing/scenarios/basic.js $(pwd)/performance-testing/results baseline.json
- name: Enable OTEL
run: |
docker compose stop
docker compose up -d --wait
- name: K6 - Execute OpenTelemetry Enabled Performance Test
run: |
bash performance-testing/scripts/k6_run.sh performance-testing/scenarios/otel.js $(pwd)/performance-testing/results baseline.json
- name: 📋 Review Test Results
run: |
BUDGET=200
bash performance-testing/scripts/review_results.sh performance-testing/results/baseline.json performance-testing/results/otel.json ${BUDGET}