Skip to content

Use Case - AT

Use Case - AT #57200

Workflow file for this run

name: Use Case - AT
on:
workflow_dispatch:
schedule:
- cron: '*/15 * * * *'
jobs:
AT22:
environment: AT22
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run use case tests
run: |
cd test/k6
docker compose run k6 run /src/tests/end2end.js -e subskey=${{ secrets.APIM_SUBSKEY }} -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userId=${{ secrets.USER_ID }} -e personNumber=${{ secrets.PERSON_NUMBER }} -e tokenGeneratorUserName=${{ secrets.TOKENGENERATOR_USERNAME }} -e tokenGeneratorUserPwd=${{ secrets.TOKENGENERATOR_USERPASSWORD }} -e partyId=${{ secrets.PARTY_ID }}
AT23:
environment: AT23
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run use case tests
run: |
cd test/k6
docker compose run k6 run /src/tests/end2end.js -e subskey=${{ secrets.APIM_SUBSKEY }} -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userId=${{ secrets.USER_ID }} -e personNumber=${{ secrets.PERSON_NUMBER }} -e tokenGeneratorUserName=${{ secrets.TOKENGENERATOR_USERNAME }} -e tokenGeneratorUserPwd=${{ secrets.TOKENGENERATOR_USERPASSWORD }} -e partyId=${{ secrets.PARTY_ID }}
AT24:
environment: AT24
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run use case tests
run: |
cd test/k6
docker compose run k6 run /src/tests/end2end.js -e subskey=${{ secrets.APIM_SUBSKEY }} -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userId=${{ secrets.USER_ID }} -e personNumber=${{ secrets.PERSON_NUMBER }} -e tokenGeneratorUserName=${{ secrets.TOKENGENERATOR_USERNAME }} -e tokenGeneratorUserPwd=${{ secrets.TOKENGENERATOR_USERPASSWORD }} -e partyId=${{ secrets.PARTY_ID }}
report-status:
name: Report status
runs-on: ubuntu-latest
needs: [AT22, AT23, AT24]
if: always() && contains(join(needs.*.result, ','), 'failure')
steps:
- name: Build failure report
run: |
report=":warning: FileScan use case test failure in AT :warning: \n See environment(s) listed below: \n"
if [ ${{ needs.AT22.result }} = 'failure' ]; then
report+="AT22 \r\n"
fi
if [ ${{ needs.AT23.result }} = 'failure' ]; then
report+="AT23 \r\n"
fi
if [ ${{ needs.AT24.result }} = 'failure' ]; then
report+="AT24 \r\n"
fi
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
id: slack
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": "${{ env.stepreport }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_TEST }}