Skip to content

Commit

Permalink
added gh run id
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-dubinin committed Oct 27, 2024
1 parent 85485a0 commit 8c4edef
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 42 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/monitoring-limit-geo-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: monitoring-test-results
uses: actions/upload-artifact@v4
with:
name: eu-trade-test-results
name: eu-trade-test-results-${{ github.run_id }}
path: packages/web/playwright-report

fe-trade-sg-tests:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
id: monitoring-test-results
uses: actions/upload-artifact@v4
with:
name: sg-trade-test-results
name: sg-trade-test-results-${{ github.run_id }}
path: packages/web/playwright-report

fe-trade-us-tests:
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
id: monitoring-test-results
uses: actions/upload-artifact@v4
with:
name: us-trade-test-results
name: us-trade-test-results-${{ github.run_id }}
path: packages/web/playwright-report

fe-bot-alert:
Expand Down
80 changes: 42 additions & 38 deletions .github/workflows/monitoring-swap-geo-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,42 +95,8 @@ jobs:
id: e2e-test-results
uses: actions/upload-artifact@v4
with:
name: us-swap-test-results
name: us-swap-test-results-${{ github.run_id }}
path: packages/web/playwright-report
- name: Send Slack alert if test fails
id: slack
if: failure()
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🚨 Synthetic Geo Swap Monitoring Tests Failure Alert 🚨"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Production App URL:* https://app.osmosis.zone"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Click here to view the run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Actions Run>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SERVER_E2E_TESTS_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

fe-swap-eu-tests:
timeout-minutes: 15
Expand Down Expand Up @@ -171,7 +137,7 @@ jobs:
id: e2e-test-results
uses: actions/upload-artifact@v4
with:
name: eu-swap-test-results
name: eu-swap-test-results-${{ github.run_id }}
path: packages/web/playwright-report

fe-swap-sg-tests:
Expand Down Expand Up @@ -213,14 +179,52 @@ jobs:
id: e2e-test-results
uses: actions/upload-artifact@v4
with:
name: sg-swap-test-results
name: sg-swap-test-results-${{ github.run_id }}
path: packages/web/playwright-report

fe-bot-alert:
runs-on: ubuntu-latest
needs: [fe-swap-us-tests, fe-swap-eu-tests, fe-swap-sg-tests]
if: failure()
steps:
- name: Send Slack alert if test fails
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🚨 Synthetic Prod Swap Monitoring Tests Failure Alert 🚨"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Click here to view the run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Actions Run>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SERVER_E2E_TESTS_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

delete-deployments:
runs-on: ubuntu-latest
if: always()
needs:
[fe-quote-tests, fe-swap-us-tests, fe-swap-sg-tests, fe-swap-eu-tests]
[
fe-quote-tests,
fe-swap-us-tests,
fe-swap-sg-tests,
fe-swap-eu-tests,
fe-bot-alert,
]
steps:
- name: Delete Previous deployments
uses: actions/github-script@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-frontend-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
id: e2e-test-results
uses: actions/upload-artifact@v4
with:
name: main-e2e-test-results
name: main-e2e-test-results-${{ github.run_id }}
path: packages/web/playwright-report
- name: Send Slack alert if test fails
id: slack
Expand Down

0 comments on commit 8c4edef

Please sign in to comment.