Regression test - PROD #346
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: Regression test - PROD | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * 1-5' | |
jobs: | |
test: | |
environment: Prod | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run email notification order regression tests | |
uses: grafana/k6-action@v0.3.1 | |
with: | |
filename: test/k6/src/tests/orders_email.js | |
flags: -e runFullTestSet=true -e env=${{ vars.ENV }} -e emailRecipient=${{ secrets.AUTOMATEDTEST_EMAILRECIPIENT }} -e ninRecipient=${{ secrets.AUTOMATEDTEST_NINRECIPIENT}} -e mpClientId=${{ secrets.MP_CLIENT_ID }} -e mpKid=${{ secrets.MP_KID }} -e encodedJwk=${{ secrets.MP_ENCODEDJWK }} -e subscriptionKey=${{ secrets.AUTOMATEDTEST_APIM_SUBSCRIPTION_KEY}} | |
- name: Run contact(s) lookup by organization number regression tests with generating an email notification | |
uses: grafana/k6-action@v0.3.1 | |
with: | |
filename: test/k6/src/tests/orders_org_no.js | |
flags: -e runFullTestSet=true -e env=${{ vars.ENV }} -e orgNoRecipient=${{ secrets.AUTOMATEDTEST_ORG_NO_RECIPIENT}} -e resourceId=${{ secrets.AUTOMATEDTEST_RESOURCE_ID}} -e mpClientId=${{ secrets.MP_CLIENT_ID }} -e mpKid=${{ secrets.MP_KID }} -e encodedJwk=${{ secrets.MP_ENCODEDJWK }} | |
- name: Run sms notification order use case tests | |
uses: grafana/k6-action@v0.3.1 | |
with: | |
filename: test/k6/src/tests/orders_sms.js | |
flags: -e runFullTestSet=true -e env=${{ vars.ENV }} -e smsRecipient=${{ secrets.AUTOMATEDTEST_SMSRECIPIENT }} -e mpClientId=${{ secrets.MP_CLIENT_ID }} -e mpKid=${{ secrets.MP_KID }} -e encodedJwk=${{ secrets.MP_ENCODEDJWK }} | |
- name: Build failure report | |
if: failure() | |
run: | | |
report=":warning: Notifications regression test failure in ${{ vars.ENV }} :warning: \n" | |
report+="\n Workflow available here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
echo "stepreport="$report >> $GITHUB_ENV | |
- name: Report failure to Slack | |
if: failure() | |
id: slack | |
uses: slackapi/slack-github-action@v2.0.0 | |
with: | |
webhook-type: incoming-webhook | |
webhook: ${{ secrets.SLACK_WEBHOOK_URL_PROD }} | |
payload: | | |
{ | |
"text": "${{ env.stepreport }}" | |
} | |