-
Notifications
You must be signed in to change notification settings - Fork 5
130 lines (124 loc) · 4.45 KB
/
weekly_tests.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Weekly Tests
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * SAT"
jobs:
weekle-tests:
name: Run weekly tests
runs-on: ubuntu-latest
timeout-minutes: 1440
outputs:
failed_tests: ${{ steps.collect-failed-tests.outputs.failed_tests }}
strategy:
max-parallel: 3
fail-fast: false
matrix:
include:
- repo: charm-advanced-routing
workflow_file_name: check.yaml
branch: master
- repo: charm-apt-mirror
workflow_file_name: check.yaml
branch: main
- repo: charm-cloudsupport
workflow_file_name: check.yaml
branch: main
- repo: charm-duplicity
workflow_file_name: check.yaml
branch: master
- repo: hardware-observer-operator
workflow_file_name: check.yaml
branch: master
- repo: hardware-observer-operator
workflow_file_name: cos_integration.yaml
branch: master
- repo: charm-juju-backup-all
workflow_file_name: check.yaml
branch: master
- repo: charm-juju-local
workflow_file_name: check.yaml
branch: main
- repo: charm-kubernetes-service-checks
workflow_file_name: check.yaml
branch: master
- repo: charm-local-users
workflow_file_name: check.yaml
branch: main
- repo: charm-logrotated
workflow_file_name: check.yaml
branch: master
- repo: charm-nginx
workflow_file_name: check.yaml
branch: main
- repo: charm-openstack-service-checks
workflow_file_name: check.yaml
branch: master
- repo: charm-prometheus-blackbox-exporter
workflow_file_name: check.yaml
branch: master
- repo: charm-prometheus-libvirt-exporter
workflow_file_name: check.yaml
branch: master
- repo: charm-simple-streams
workflow_file_name: check.yaml
branch: main
- repo: charm-storage-connector
workflow_file_name: check.yaml
branch: master
- repo: charm-sysconfig
workflow_file_name: check.yaml
branch: master
- repo: charm-userdir-ldap
workflow_file_name: check.yaml
branch: master
- repo: prometheus-hardware-exporter
workflow_file_name: check.yaml
branch: main
- repo: prometheus-juju-exporter
workflow_file_name: pr.yaml
branch: main
- repo: prometheus-juju-backup-all-exporter
workflow_file_name: pr.yaml
branch: main
- repo: snap-tempest
workflow_file_name: pr.yaml
branch: main
- repo: charmed-openstack-upgrader
workflow_file_name: check.yaml
branch: main
steps:
- name: Running ${{ matrix.workflow_file_name }} tests for ${{ matrix.repo }}
uses: convictional/[email protected]
id: dispatched-tests
with:
owner: canonical
repo: ${{ matrix.repo }}
github_token: ${{ secrets.GHA_WORKFLOW_TRIGGER }}
workflow_file_name: ${{ matrix.workflow_file_name }}
ref: ${{ matrix.branch }}
wait_interval: 60
- name: Collect failed tests
id: collect-failed-tests
if: ${{ failure() }}
run: |
failed_tests=""
if [ "${{ steps.dispatched-tests.outcome }}" != "success" ]; then
failed_tests+="[${{ matrix.repo }}](https://github.com/canonical/${{ matrix.repo }}/actions), "
fi
# Set the output variable to pass the failed tests to the next job
echo "failed_tests=$failed_tests" >> "$GITHUB_OUTPUT"
notify-on-failure:
needs: [weekle-tests]
if: ${{ failure() }}
name: Notify Mattermost Channel
runs-on: ubuntu-latest
steps:
- name: Create the Mattermost Message
env:
WEEKLE_TESTS: ${{ needs.weekle-tests.outputs.failed_tests }}
run: |
echo "{\"text\":\":robot_face: [Weekly tests]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) have failed for these projects: $WEEKLE_TESTS\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}