Skip to content

Test Runner Nightly Perf Tests #985

Test Runner Nightly Perf Tests

Test Runner Nightly Perf Tests #985

name: Test Runner Nightly Perf Tests
on:
workflow_dispatch: { }
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC, 1 AM ET.
jobs:
test-runner-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Get Vault token
id: vault-token-step
env:
VAULT_ADDR: https://clotho.broadinstitute.org:8200
run: |
VAULT_TOKEN=$(docker run --rm --cap-add IPC_LOCK \
-e "VAULT_ADDR=${VAULT_ADDR}" \
vault:1.1.0 \
vault write -field token \
auth/approle/login role_id=${{ secrets.VAULT_APPROLE_ROLE_ID }} \
secret_id=${{ secrets.VAULT_APPROLE_SECRET_ID }})
echo ::add-mask::$VAULT_TOKEN
echo vault-token=$VAULT_TOKEN >> $GITHUB_OUTPUT
- name: Render configs for Test Runner
run: |
buffer-clienttests/tools/render-config.sh buffertest ${{ steps.vault-token-step.outputs.vault-token }}
buffer-clienttests/tools/render-config.sh yyu ${{ steps.vault-token-step.outputs.vault-token }}
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
.gradle/caches
.gradle/wrapper
key: v1-${{ runner.os }}-gradle-${{ hashfiles('**/gradle-wrapper.properties') }}-${{ hashFiles('**/*.gradle') }}
restore-keys: v1-${{ runner.os }}-gradle-${{ hashfiles('**/gradle-wrapper.properties') }}
- name: Run the Perf test suite
id: perf-test
run: |
TEST_RUNNER_SERVER_SPECIFICATION_FILE="unauthorized-buffertest.json" ./gradlew runTest --scan --args="configs/UnauthorizedAccess.json build/reports"
TEST_RUNNER_SERVER_SPECIFICATION_FILE="buffertest.json" ./gradlew runTest --scan --args="configs/HandoutResourcesThenWaitForRefill.json build/reports"
- name: Upload Test Reports
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Reports
path: buffer-clienttests/build/reports
- name: Notify QA Slack
# Always notify #dsde-qa when test finishes, and it is not manually triggered(workflow_dispatch).
if: github.event_name != 'workflow_dispatch' && always()
uses: broadinstitute/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
channel: "#dsde-qa"
username: "Resource Buffer tests"
text: "Perf tests"
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
- name: Notify PF team when perf test fails
if: failure() && github.event_name != 'workflow_dispatch'
uses: broadinstitute/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
channel: "#platform-foundation-alerts"
username: "Resource Buffer tests"
text: "Perf tests fail"
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took