Skip to content

Commit

Permalink
Restructure manual runs
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianliebig committed Oct 17, 2024
1 parent aad5fa1 commit 6f43b84
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/performance_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Manuell Performance Tests

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
id-token: write

jobs:
add-runner:
uses: ./.github/workflows/runner_attach_workflow.yml
with:
RunnerCount: 1
RunnerComputeType: "M"
secrets:
GitHubToken: ${{ secrets.RUNNER_ATTACH_API_KEY }}
AWSRoleToAssume: ${{ secrets.AWS_ROLE_TO_ASSUME }}

performancetest:
needs: add-runner
runs-on: self-hosted
name: Performance Tests 3.10
env:
BAYBE_PERFORMANCE_PERSISTANCE_PATH: ${{ secrets.TEST_RESULT_S3_BUCKET }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.10'
- name: Run performance test
run: |
pip install tox-uv
tox -e performancetest-py310
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
default: 1
type: number
RunnerComputeType:
description: 'The type which indicates the compute power of the runner. Either "XS", "S", "M", "L" or "XL"'
description: 'The type which indicates the compute power of the runner. Eighter "XS", "S", "M", "L" or "XL"'
required: false
default: 'S'
type: string
Expand Down Expand Up @@ -43,9 +43,9 @@ jobs:

- name: Execute Lambda function
run: |
aws lambda invoke --function-name jit_runner_register_and_create_runner_container --cli-binary-format raw-in-base64-out --payload '{"github_api_secret": "${{ secrets.GitHubToken }}", "count_container": ${{ inputs.RunnerCount }}, "container_compute": "${{ inputs.RunnerComputeType }}", "repository": "${{ github.repository }}" }' response.json
aws lambda invoke --function-name baybe_performence-tests_register_and_create_runner_container --cli-binary-format raw-in-base64-out --payload '{"github_api_secret": "${{ secrets.GitHubToken }}", "count_container": ${{ inputs.RunnerCount }}, "container_compute": "${{ inputs.RunnerComputeType }}", "repository": "${{ github.repository }}" }' response.json
cat response.json
if ! grep -q '"statusCode": 200' response.json; then
echo "Lambda function failed. statusCode is not 200."
exit 1
fi
fi

0 comments on commit 6f43b84

Please sign in to comment.