-
Notifications
You must be signed in to change notification settings - Fork 131
67 lines (61 loc) · 2.02 KB
/
lib-integration-tests-runner.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Runner for the suite of ML Lib tests
#
name: Library Integration Tests Runner
on:
workflow_dispatch:
inputs:
libs:
description: "Choose specific library to test against or all"
required: true
type: choice
options:
- all
- openai
push:
branches:
- bump-version-**
schedule:
- cron: "0 0 */1 * *"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
LIBS: ${{ github.event.inputs.libs != '' && github.event.inputs.libs || 'all' }}
COMET_RAISE_EXCEPTIONS_ON_ERROR: "1"
jobs:
init_environment:
name: Build
runs-on: ubuntu-latest
outputs:
LIBS: ${{ steps.init.outputs.LIBS }}
steps:
- name: Make LIBS variable global (workaround for cron)
id: init
run: |
echo "LIBS=${{ env.LIBS }}" >> $GITHUB_OUTPUT
openai_tests:
needs: [init_environment]
if: contains(fromJSON('["openai", "all"]'), needs.init_environment.outputs.LIBS)
uses: ./.github/workflows/lib-openai-tests.yml
secrets: inherit
notify_slack_failed:
if: ${{ always() && contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') }}
needs: [openai_tests]
runs-on: ubuntu-latest
steps:
- name: Report Status Failure
uses: ravsamhq/notify-slack-action@v1
with:
status: failure
notification_title: "{workflow} has {status_message}"
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>'
mention_users: 'U03NKJ7HLF9'
notify_slack_success:
if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'skipped')}}
needs: [openai_tests]
runs-on: ubuntu-latest
steps:
- name: Report Status Success
uses: ravsamhq/notify-slack-action@v1
with:
status: success
notification_title: "{workflow} has {status_message}"
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>'