-
-
Notifications
You must be signed in to change notification settings - Fork 187
55 lines (49 loc) · 1.89 KB
/
ci-test.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
name: ci
on:
push:
branches: [ kalvis/github-actions-bot ]
jobs:
changes:
runs-on: ubuntu-latest
permissions: { pull-requests: read }
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
name: Detect changed files
with: { filters: .github/filters.yml }
outputs:
darker: ${{ steps.filter.outputs.darker }}
pytest: ${{ steps.filter.outputs.pytest }}
npm-test: ${{ steps.filter.outputs.npm-test }}
darker:
needs: changes
uses: ./.github/workflows/darker.yml
if: needs.changes.outputs.darker == 'true'
pytest:
needs: changes
uses: ./.github/workflows/pytest.yml
if: needs.changes.outputs.pytest == 'true'
npm-test:
needs: changes
uses: ./.github/workflows/npm-test.yml
if: needs.changes.outputs.npm-test == 'true'
# for testing
on-failure:
runs-on: ubuntu-latest
if: ${{ always() && (needs.darker.result == 'failure' || needs.darker.result == 'timed_out' || needs.pytest.result == 'failure' || needs.pytest.result == 'timed_out' || needs.npm-test.result == 'failure' || needs.npm-test.result == 'timed_out') }}
needs:
- darker
- pytest
- npm-test
steps:
- name: Send a stream message
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY_GITHUB_ACTIONS_BOT }}
email: "[email protected]"
organization-url: "https://chat.kobotoolbox.org"
type: "stream"
to: "Kobo Dev"
topic: "Github Actions (main)"
content: ":boom: [Run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) failed on `main` at [${{ toJson(github.event.commits[0].message) }}](${{ github.event.compare }})! CC @**Kalvis Kalniņš** please investigate and emoji this message when resolved."