Skip to content

Commit

Permalink
no docker in k6 task + regression workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
acn-sbuad committed Jan 15, 2024
1 parent e1be02b commit 2e955c3
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 9 deletions.
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

0 comments on commit 2e955c3

Please sign in to comment.