Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added regression test workflows #GCPActive #379

Merged
merged 5 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/regression-test-ATX.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Regression test - AT

on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 1-5'

jobs:
test:
strategy:
fail-fast: false
matrix:
environment: [AT21, AT22, AT23, AT24]
environment: ${{ matrix.environment }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run email notification order regression tests
uses: grafana/[email protected]
with:
filename: test/k6/src/tests/orders_email.js
flags: -e runFullTestSet=true -e env=${{ vars.ENV }} -e tokenGeneratorUserName=${{ secrets.TOKENGENERATOR_USERNAME }} -e tokenGeneratorUserPwd=${{ secrets.TOKENGENERATOR_USERPASSWORD }} -e emailRecipient=${{ secrets.AUTOMATEDTEST_EMAILRECIPIENT }}
- name: Build failure report
if: failure()
run: |
report=":warning: Notifications regression test failure in ${{ matrix.environment }} :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_TEST }}

36 changes: 36 additions & 0 deletions .github/workflows/regression-test-PROD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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/[email protected]
with:
filename: test/k6/src/tests/orders_email.js
flags: -e runFullTestSet=true k6 run /src/tests/orders_email.js -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 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/[email protected]
with:
payload: |
{
"text": "${{ env.stepreport }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PROD }}

36 changes: 36 additions & 0 deletions .github/workflows/regression-test-TT02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Regression test - TT02

on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 1-5'

jobs:
test:
environment: TT02
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run email notification order regression tests
uses: grafana/[email protected]
with:
filename: test/k6/src/tests/orders_email.js
flags: -e runFullTestSet=true -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 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/[email protected]
with:
payload: |
{
"text": "${{ env.stepreport }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PROD }}

7 changes: 4 additions & 3 deletions .github/workflows/use-case-ATX.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run email notification order use case tests
run: |
cd test/k6
docker-compose run k6 run /src/tests/orders_email.js -e env=${{ vars.ENV }} -e tokenGeneratorUserName=${{ secrets.TOKENGENERATOR_USERNAME }} -e tokenGeneratorUserPwd=${{ secrets.TOKENGENERATOR_USERPASSWORD }} -e emailRecipient=${{ secrets.AUTOMATEDTEST_EMAILRECIPIENT }}
uses: grafana/[email protected]
with:
filename: test/k6/src/tests/orders_email.js
flags: -e env=${{ vars.ENV }} -e tokenGeneratorUserName=${{ secrets.TOKENGENERATOR_USERNAME }} -e tokenGeneratorUserPwd=${{ secrets.TOKENGENERATOR_USERPASSWORD }} -e emailRecipient=${{ secrets.AUTOMATEDTEST_EMAILRECIPIENT }}
- name: Build failure report
if: failure()
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/use-case-PROD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run email notification order use case tests
run: |
cd test/k6
docker-compose run k6 run /src/tests/orders_email.js -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 }}
uses: grafana/[email protected]
with:
filename: test/k6/src/tests/orders_email.js
flags: k6 run /src/tests/orders_email.js -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: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/use-case-TT02.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run email notification order use case tests
run: |
cd test/k6
docker-compose run k6 run /src/tests/orders_email.js -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 }}
uses: grafana/[email protected]
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: |
Expand Down
Loading