Skip to content

Commit

Permalink
setup slack ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Nov 27, 2024
1 parent dda867b commit b51523e
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,41 @@ jobs:
VENOM_VAR_email: ${{ secrets.E2E_GCP_SA_EMAIL }}
VENOM_VAR_token: ${{ secrets.E2E_GCP_SA_TOKEN }}
run: venom run -vv --html-report --format=json --output-dir ${{ env.TESTOUT_PATH }} test/plural
- name: Upload artifacts
- name: Post a slack message on finish
uses: slackapi/[email protected]
with:
webhook-type: incoming-webhook
webhook: ${{ secrets.SLACK_WEBHOOK }}
payload: |
text: "*GitHub Action build result*: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
if: always()
uses: actions/upload-artifact@v4
- name: Upload venom log on failure
uses: slackapi/[email protected]
with:
name: gcp
path: |
${{ env.TESTOUT_PATH }}/venom.log
${{ env.TESTOUT_PATH }}/test_results.html
compression-level: 9
method: files.uploadV2
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
initial_comment: "Google e2e test has failed. Here is the generated log file."
file: "${{ env.TESTOUT_PATH }}/venom.log"
filename: "venom-${{ github.sha }}.log"
if: failure()
- name: Upload venom html report on failure
uses: slackapi/[email protected]
with:
method: files.uploadV2
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
initial_comment: "Google e2e test has failed. Here is the generated html report."
file: "${{ env.TESTOUT_PATH }}/test_results.html"
filename: "venom-${{ github.sha }}.html"
if: failure()
plural-up-azure:
name: plural up / Azure
runs-on: ubuntu-latest
Expand Down

0 comments on commit b51523e

Please sign in to comment.