Automated Staging Test - Run integration tests #95
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: Automated Staging Test - Run integration tests | |
on: | |
schedule: | |
- cron: "0 7 * * 2-6" # Tuesday to Saturday at 2am EST (7am UTC) - two hours after `automated-staging-test-submit` runs | |
workflow_dispatch: | |
inputs: | |
name: | |
type: choice | |
description: Type of Staging Test | |
default: Automated Staging Test | |
options: | |
- Automated Staging Test | |
- Golden Copy Staging Test | |
jobs: | |
test_files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Determine variable type | |
run: | | |
test_type=automatedTest | |
title=Automated | |
file_path=../examples/Test/Automated/ | |
if [ "${{ github.event.inputs.name }}" == "Golden Copy Staging Test" ]; then | |
test_type=goldenCopyTest | |
title=Golden Copy | |
file_path=../examples/Test/GoldenCopy/Expected/ | |
fi | |
echo "test_type=$test_type" >> $GITHUB_OUTPUT | |
echo "title=$title" >> $GITHUB_OUTPUT | |
echo "file_path=$file_path" >> $GITHUB_OUTPUT | |
done | |
- name: Run automated tests | |
env: | |
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AUTOMATED_TEST_AZURE_STORAGE_CONNECTION_STRING }} | |
LOCAL_FILE_PATH: ${{ steps.getFunctionList.outputs.file_path }} | |
run: | | |
./gradlew rs-e2e:clean rs-e2e:${{ steps.getFunctionList.outputs.test_type }} | |
done | |
- name: Send slack notification on test failure | |
if: failure() | |
uses: slackapi/slack-github-action@v2.0.0 | |
with: | |
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
webhook-type: incoming-webhook | |
payload: | | |
text: "${{ steps.getFunctionList.outputs.title }} Staging RS Integration Test Failed!: https://github.com/CDCgov/trusted-intermediary/actions/runs/${{ github.run_id }}" |