CI Stage Load Test #41
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: CI Stage Load Test | |
on: | |
workflow_dispatch: | |
inputs: | |
scenario: | |
type: string | |
description: Key=Value-space separated config for the test run. | |
github_org: | |
type: string | |
description: Github Organization for cloning repository. | |
# journey_repeats: | |
# type: string | |
# description: Number of sequential user journey repetitions | |
jobs: | |
load_test: | |
runs-on: ubuntu-latest | |
env: | |
ARTIFACT_DIR: ${{ github.workspace }}/tests/load-test/.artifacts/ | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up jq | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y jq | |
- name: Prepare Load Test | |
working-directory: ./tests/load-tests | |
env: | |
STAGING_USERS_1: ${{ secrets.STAGING_USERS_1 }} | |
STAGING_USERS_2: ${{ secrets.STAGING_USERS_2 }} | |
STAGING_USERS_3: ${{ secrets.STAGING_USERS_3 }} | |
STAGING_USERS_4: ${{ secrets.STAGING_USERS_4 }} | |
STAGING_USERS_5: ${{ secrets.STAGING_USERS_5 }} | |
STAGING_USERS_6: ${{ secrets.STAGING_USERS_6 }} | |
STAGING_USERS_7: ${{ secrets.STAGING_USERS_7 }} | |
STAGING_USERS_8: ${{ secrets.STAGING_USERS_8 }} | |
run: ./ci-scripts/merge-json.sh $STAGING_USERS_1 $STAGING_USERS_2 $STAGING_USERS_3 $STAGING_USERS_4 $STAGING_USERS_5 $STAGING_USERS_6 $STAGING_USERS_7 $STAGING_USERS_8 | |
- name: Run Load Test | |
working-directory: ./tests/load-tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
MY_GITHUB_ORG: ${{ github.event.inputs.github_org }} | |
SCENARIO: ${{ github.event.inputs.scenario }} | |
run: | | |
export $SCENARIO | |
./run-stage.sh | |
- name: Collect results | |
working-directory: ./tests/load-tests | |
env: | |
SCENARIO: ${{ github.event.inputs.scenario }} | |
STAGE_MEMBER_CLUSTER: ${{ secrets.STAGE_MEMBER_CLUSTER }} | |
OCP_PROMETHEUS_TOKEN: ${{ secrets.OCP_PROMETHEUS_TOKEN }} | |
run: | | |
export $SCENARIO | |
./ci-scripts/stage/collect-results.sh ${CONCURRENCY:-1} . | |
- name: List files in the artifact directory | |
run: ls -la ${{ env.ARTIFACT_DIR }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rhtap-load-test-stage | |
path: ${{ env.ARTIFACT_DIR }} | |
include-hidden-files: true |