Use Case - PROD #33906
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: Use Case - PROD | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '*/15 * * * *' | |
jobs: | |
test: | |
environment: Prod | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run email notification order use case tests | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/orders_email.js | |
flags: -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 use case tests with generating an email notification | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/orders_org_no.js | |
flags: -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/[email protected] | |
with: | |
filename: test/k6/src/tests/orders_sms.js | |
flags: -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 use case 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/[email protected] | |
with: | |
payload: | | |
{ | |
"text": "${{ env.stepreport }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PROD }} | |