Skip to content

Integration Tests

Integration Tests #28

name: Integration Tests
on:
schedule:
- cron: '00 08 * * 1'
workflow_dispatch:
inputs:
environment:
required: true
type: choice
description: Select the Environment
options:
- dev
- uat
default: uat
canary:
description: 'run the tests on canary version'
required: false
type: boolean
default: false
permissions:
id-token: write
contents: read
deployments: write
jobs:
integration_test:
name: Test
runs-on: ubuntu-latest
environment: ${{(github.event.inputs == null && 'uat') || inputs.environment }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
- name: Run Integration Tests
shell: bash
run: |
export CANARY=${{ inputs.canary }}
export REPORTING_BATCH_QUEUE=${{ vars.REPORTING_BATCH_QUEUE }}
export FLOW_SA_CONNECTION_STRING="${{ secrets.FLOW_SA_CONNECTION_STRING }}"
cd ./integration-test
chmod +x ./run_integration_test.sh
./run_integration_test.sh ${{( github.event.inputs == null && 'uat') || inputs.environment }} ${{ secrets.API_SUBSCRIPTION_KEY }}
notify:
needs: [ integration_test ]
runs-on: ubuntu-latest
name: Notify
if: always()
steps:
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ needs.integration_test.result }}
token: ${{ secrets.GITHUB_TOKEN }}
notify_when: 'failure,skipped'
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} <{workflow_url}|{workflow}> {status_message} in <{repo_url}|{repo}>'
footer: 'Linked to Repo <{repo_url}|{repo}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}