-
Notifications
You must be signed in to change notification settings - Fork 1.9k
48 lines (45 loc) · 1.57 KB
/
tests_skipper_trigger.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
# If you change this name also do it in tests.yml and ci_metrics.yml
name: Tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths-ignore:
# we skip the tests unless the code changes. The problem is that GitHub will run the check anyway if any other
# file outside the code changed (e.g. the release notes). Hence, we need a second filter down below.
# keep the list in sync with the paths defined in the `tests.yml` workflow
- "haystack/**/*.py"
- "haystack/core/pipeline/predefined/*"
- "test/**/*.py"
jobs:
check_if_changed:
name: Check if changed
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
code_changes: ${{ steps.changes.outputs.code_changes }}
steps:
- uses: actions/checkout@v4
- name: Check for changed code
id: changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
with:
# keep the list in sync with the paths defined in the `tests.yml` workflow
filters: |
code_changes:
- haystack/**/*.py
- "haystack/templates/predefined/*"
- test/**/*.py
- "pyproject.toml"
trigger-catch-all:
name: Tests completed
# Don't run this check if the PR contains both code and non-code changes (e.g. release notes)
needs: check_if_changed
if: needs.check_if_changed.outputs.code_changes == 'false'
uses: ./.github/workflows/tests_skipper_workflow.yml
with:
tests_were_skipped: true