Skip to content

Commit

Permalink
test: Update naming from test runs to match Tekton (#4052)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Jun 15, 2023
1 parent 22ff8d5 commit 9c654b1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/actions/e2e/slack/notify/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@ inputs:
url:
description: "Webhook URL to send the Slack notification to"
required: true
event_name:
description: "Type of event that triggered this test run"
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
path: actions
- shell: bash
run: |
if [[ ${{ inputs.event_name }} == "schedule" ]]; then
RUN_NAME="${{ inputs.suite }}-periodic"
else
RUN_NAME="${{ inputs.suite }}-${GITHUB_SHA::7}"
fi
# Convert the RUN_NAME to all lowercase
echo RUN_NAME=${RUN_NAME,,} >> $GITHUB_ENV
- uses: ./actions/.github/actions/e2e/slack/send-message
if: ${{ job.status == 'success' }}
with:
url: ${{ inputs.url }}
message: ":white_check_mark: ${{ inputs.suite }}-${{ github.run_id }} suite succeeded"
message: ":white_check_mark: ${{ env.RUN_NAME }} tests succeeded"
- uses: ./actions/.github/actions/e2e/slack/send-message
if: ${{ job.status == 'failure' }}
with:
url: ${{ inputs.url }}
message: ":x: ${{ inputs.suite }}-${{ github.run_id }} suite failed"
message: ":x: ${{ env.RUN_NAME }} tests failed"
1 change: 1 addition & 0 deletions .github/workflows/e2e-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
with:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
suite: Upgrade
event_name: ${{ inputs.event_name }}
- name: dump logs on failure
uses: ./actions/.github/actions/e2e/dump-logs
if: failure() || cancelled()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
with:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
suite: ${{ inputs.suite }}
event_name: ${{ inputs.event_name }}
- name: dump logs on failure
uses: ./actions/.github/actions/e2e/dump-logs
if: failure() || cancelled()
Expand Down

0 comments on commit 9c654b1

Please sign in to comment.