diff --git a/.github/workflows/performance_tests.yml b/.github/workflows/performance_tests.yml new file mode 100644 index 000000000..d21158ecc --- /dev/null +++ b/.github/workflows/performance_tests.yml @@ -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 \ No newline at end of file diff --git a/.github/workflow_templates/runner_attach_workflow.yml b/.github/workflows/runner_attach_workflow.yml similarity index 77% rename from .github/workflow_templates/runner_attach_workflow.yml rename to .github/workflows/runner_attach_workflow.yml index 6ad92e34f..dac8e9ba0 100644 --- a/.github/workflow_templates/runner_attach_workflow.yml +++ b/.github/workflows/runner_attach_workflow.yml @@ -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 @@ -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 \ No newline at end of file + fi