Skip to content

Commit

Permalink
WX-1154 Fix Slack Messaging (#7159)
Browse files Browse the repository at this point in the history
  • Loading branch information
THWiseman authored Jun 13, 2023
1 parent fe0da4b commit adb8d2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 47 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,15 @@ name: 'Integration Tests'

#This github action runs all of Cromwell's integration tests.

#This is what shows up in the github workflows page as the title.
run-name: ${{ github.actor }} Integration Testing.
# This is what shows up in the github workflows page as the title. Using github ternary syntax & format() function.
run-name: ${{ github.event_name == 'schedule' && 'Nightly Integration Testing' || format('{0} Integration Testing', github.actor) }}

#What will trigger the workflow to run.
on:
workflow_call:
inputs:
target-branch:
description: 'The branch to run integration tests against'
required: false
type: string
slack-alert:
description: 'A flag to enable slack alerts. True if this should alert via slack'
required: true
default: false
type: boolean
secrets:
VAULT_ROLE_ID_CI:
required: true
VAULT_SECRET_ID_CI:
required: true
BROADBOT_GITHUB_TOKEN:
required: true
SLACK_WEBHOOK_URL:
required: false
workflow_dispatch: #Manual trigger from GitHub UI
push: #git push
push:
schedule:
- cron: '0 0 * * 1-5'
merge_group:

permissions:
Expand Down Expand Up @@ -115,8 +97,10 @@ jobs:
set -e
echo Running test.sh
./src/ci/bin/test.sh
# always() is some github magic that forces the following step to run, even when the previous fails.
# Without it, the if statement won't be evaluated on a test failure.
- uses: ravsamhq/notify-slack-action@v2
if: inputs.slack-alert
if: always() && github.ref == 'refs/heads/develop' #only report on failures against develop.
with:
status: ${{ job.status }}
notify_when: "failure"
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/nightly_integration_tests.yml

This file was deleted.

0 comments on commit adb8d2a

Please sign in to comment.