Use Case - PROD #5137
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/k6-action@v0.3.1 | |
with: | |
filename: test/k6/src/tests/orders_email.js | |
flags: -e env=${{ vars.ENV }} -e emailRecipient=${{ secrets.AUTOMATEDTEST_EMAILRECIPIENT }} -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/slack-github-action@v1.24.0 | |
with: | |
payload: | | |
{ | |
"text": "${{ env.stepreport }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PROD }} | |