Skip to content

Run psu load test

Run psu load test #45

Workflow file for this run

name: Run psu load test
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to run tests against. Allowed values are dev or ref'
required: true
default: 'ref'
maxVusers:
description: 'Maximum number of vusers to create per load generator'
required: true
default: '45'
duration:
description: 'The duration to keep creating users for. Note - it may be up to 10 minutes after the last user was created that the test finishes'
required: true
default: '300'
loadGeneratorCount:
description: 'The number of load generators to launch.'
required: true
default: '2'
jobs:
run_artillery:
name: Run Artillery
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
- name: Install asdf
uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
with:
asdf_branch: v0.14.0
- name: Cache asdf
uses: actions/cache@v4
with:
path: |
~/.asdf
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
restore-keys: |
${{ runner.os }}-asdf-
- name: Install asdf dependencies in .tool-versions
uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
with:
asdf_branch: v0.14.0
env:
PYTHON_CONFIGURE_OPTS: --enable-shared
- name: Install Dependencies
run: make install
- name: Assume dev artillery runner role
if: github.event.inputs.environment == 'dev'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.DEV_ARTILLERY_RUNNER_ROLE }}
role-session-name: github-actions-artillery
- name: Assume ref artillery runner role
if: github.event.inputs.environment == 'ref'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.REF_ARTILLERY_RUNNER_ROLE }}
role-session-name: github-actions-artillery
- name: Run primer load tests
shell: bash
run: |
./scripts/run_primer_psu_load_test.sh \
"${{ github.event.inputs.environment }}"
- name: Run load tests
shell: bash
env:
maxVusers: ${{ github.event.inputs.maxVusers }}
duration: ${{ github.event.inputs.duration }}
environment: ${{ github.event.inputs.environment }}
loadGeneratorCount: ${{ github.event.inputs.loadGeneratorCount }}
run: |
./scripts/run_psu_load_test.sh
- uses: actions/upload-artifact@v4
if: always()
name: Upload test_report
with:
name: test_report
path: |
psu_load_test.json
psu_load_test.json.html