Skip to content

Commit 43baf79

Browse files
committed
Install tests: Bring back nightly msg
1 parent 9836414 commit 43baf79

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/qa-install-tests-workflow.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
required: false
1010
type: boolean
1111
default: false
12+
nightly:
13+
required: false
14+
type: boolean
15+
default: false
16+
slack_channel_nightly_msg:
17+
required: false
18+
type: string
19+
default: 'C02PB9A9F45'
1220
secrets:
1321
jira_username:
1422
required: true
@@ -160,3 +168,34 @@ jobs:
160168
shell: bash
161169
run: |
162170
movai remove --all
171+
172+
Slack-Message-On-Failure:
173+
runs-on: ubuntu-22.04
174+
needs: [Validate-features, Run-Tests]
175+
if: always()
176+
steps:
177+
- name: Prepare slack variables
178+
id: pre_slack
179+
run: |
180+
MESSAGE=":white_check_mark: CI: ${GITHUB_REPOSITORY} (${GITHUB_REF#refs/heads/}), stable :sunny: Details: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
181+
MESSAGE_ERR=":x: CI: ${GITHUB_REPOSITORY}, (${GITHUB_REF#refs/heads/}), unstable :rain_cloud: Details: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
182+
echo "msg=$MESSAGE" >> $GITHUB_OUTPUT
183+
echo "msg_error=$MESSAGE_ERR" >> $GITHUB_OUTPUT
184+
185+
- name: Slack message success
186+
if: ${{ inputs.nightly && ( needs.Validate-features.result == 'success' && needs.Run-Tests.result == 'success' ) }}
187+
uses: slackapi/slack-github-action@v1.23.0
188+
with:
189+
channel-id: ${{ inputs.slack_channel_nightly_msg }}
190+
slack-message: ${{ steps.pre_slack.outputs.msg }}
191+
env:
192+
SLACK_BOT_TOKEN: ${{ secrets.slack_token_id }}
193+
194+
- name: Slack message failure
195+
if: ${{ inputs.nightly && ( needs.Validate-features.result == 'failure' || needs.Run-Tests.result == 'failure' ) }}
196+
uses: slackapi/slack-github-action@v1.23.0
197+
with:
198+
channel-id: 'C02PB9A9F45'
199+
slack-message: ${{ steps.pre_slack.outputs.msg_error }}
200+
env:
201+
SLACK_BOT_TOKEN: ${{ secrets.slack_token_id }}

0 commit comments

Comments
 (0)