-
Notifications
You must be signed in to change notification settings - Fork 30
45 lines (41 loc) · 1.41 KB
/
postmerge-gpu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: GPU CI (Post-merge)
on:
workflow_dispatch:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
gpu-ci-postmerge:
runs-on: 1GPU
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run tests
run: |
ref_type=${{ github.ref_type }}
branch=main
if [[ $ref_type == "tag"* ]]
then
raw=$(git branch -r --contains ${{ github.ref_name }})
branch=${raw/origin\/}
fi
cd ${{ github.workspace }}; tox -e test-gpu-postmerge -- $branch
# If failures occur, notify in slack.
- name: Notify Failure in Slack
id: slack
uses: slackapi/[email protected]
if: ${{ failure() && github.ref == 'refs/heads/main' }}
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"message": "GitHub Action job failure on github.ref `${{ github.ref }}`",
"pull_request": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"workflow": "${{ github.workflow }}",
"logs_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
PR_NUMBER: ${{ github.event.number }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}