Skip to content

Load Tests

Load Tests #8

Workflow file for this run

name: Load Tests
on:
schedule:
# at 00:00 every Saturday.
- cron: '0 0 * * 6'
workflow_dispatch:
permissions: write-all
jobs:
load_tests:
name: Dataflow Templates Load tests
timeout-minutes: 4320 # 3 days
# Run on any runner that matches all the specified runs-on values.
runs-on: [ self-hosted, perf ]
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Setup Environment
id: setup-java-env
uses: ./.github/actions/setup-java-env
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Get Host IP
id: variables
run: echo "hostIP=$(gcloud compute instances list | grep $(hostname) | awk '{print $4; exit}' )" >> $GITHUB_OUTPUT
- name: Run load tests with Maven
run: |
mvn test -PtemplatesLoadTests \
-Dproject=cloud-teleport-testing \
-DartifactBucket=gs://cloud-teleport-testing-it-gitactions \
-DhostIp=${HOST_IP} \
-DprivateConnectivity="datastream-connect-2" \
-DexportProject=cloud-teleport-testing \
-DexportDataset=performance_tests \
-DexportTable=template_performance_metrics -e -fae
env:
HOST_IP: ${{ steps.variables.outputs.hostIP }}
- name: Create Github issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
DATE: ${{ steps.date.outputs.date }}
with:
filename: .github/ISSUE_TEMPLATE/load-test-failure-issue-template.md
- name: Upload Load Tests Report
uses: actions/upload-artifact@v5
if: always() # always run even if the previous step fails
with:
name: surefire-test-results
path: |
**/surefire-reports/TEST-*.xml
**/surefire-reports/*.html
**/surefire-reports/html/**
retention-days: 1
- name: Integration Test report on GitHub
uses: dorny/test-reporter@v2
if: always()
with:
name: Integration Test report on GitHub
path: '**/surefire-reports/TEST-*.xml'
reporter: java-junit
only-summary: 'true'
token: ${{ secrets.GITHUB_TOKEN }}
fail-on-error: 'false'
list-suites: 'failed'
list-tests: 'failed'
- name: Cleanup Java Environment
uses: ./.github/actions/cleanup-java-env