Skip to content

Commit

Permalink
Merge pull request #46655 from margelo/fix/e2e-announce-build-failures
Browse files Browse the repository at this point in the history
[NoQA] ci: announce e2e build failures
  • Loading branch information
rlinoz authored Aug 2, 2024
2 parents a6ab91e + ed21ec4 commit c72f7a9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
EXPENSIFY_PARTNER_PASSWORD_EMAIL:
description: The email address of the Expensify partner to use for the build
required: true
SLACK_WEBHOOK_URL:
description: 'URL of the slack webhook'
required: true

runs:
using: composite
Expand Down Expand Up @@ -75,6 +78,23 @@ runs:
env:
RUBYOPT: '-rostruct'

- name: Announce failed workflow in Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: custom
custom_payload: |
{
channel: '#e2e-announce',
attachments: [{
color: 'danger',
text: `🚧 ${process.env.AS_REPO} E2E APK build run failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 🚧`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}

- name: Upload APK
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
EXPENSIFY_PARTNER_USER_ID: ${{ secrets.EXPENSIFY_PARTNER_USER_ID }}
EXPENSIFY_PARTNER_USER_SECRET: ${{ secrets.EXPENSIFY_PARTNER_USER_SECRET }}
EXPENSIFY_PARTNER_PASSWORD_EMAIL: ${{ secrets.EXPENSIFY_PARTNER_PASSWORD_EMAIL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
PATH_ENV_FILE: tests/e2e/.env.e2e

buildDelta:
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
EXPENSIFY_PARTNER_USER_ID: ${{ secrets.EXPENSIFY_PARTNER_USER_ID }}
EXPENSIFY_PARTNER_USER_SECRET: ${{ secrets.EXPENSIFY_PARTNER_USER_SECRET }}
EXPENSIFY_PARTNER_PASSWORD_EMAIL: ${{ secrets.EXPENSIFY_PARTNER_PASSWORD_EMAIL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
PATH_ENV_FILE: tests/e2e/.env.e2edelta

runTestsInAWS:
Expand Down Expand Up @@ -239,7 +241,7 @@ jobs:
channel: '#e2e-announce',
attachments: [{
color: 'danger',
text: `💥 ${process.env.AS_REPO} E2E Test run failed failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 💥`,
text: `💥 ${process.env.AS_REPO} E2E Test run failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 💥`,
}]
}
env:
Expand Down

0 comments on commit c72f7a9

Please sign in to comment.