haystack/.github/workflows/tests_skipper_trigger.yml
Tobias Wochinger 451fae880e
ci: fix catch-all (#7215)
* ci: trigger separate workflow

* ci: temporary use current branch

* ci: fix workflow name

* ci: try with same job name

* ci: try with dispatch

* Revert "ci: try with dispatch"

This reverts commit bd66e56c0697ae97fc2599eebaceff417d9be65c.

* Revert "ci: try with same job name"

This reverts commit 9e2ae5b402758c14a9f812c2e06f820bd3ece767.

* ci: try with workflow call in both cases

* ci: introduce change to trigger CI

* Revert "ci: introduce change to trigger CI"

This reverts commit e3ec07c5e26f114364babea69535183253c801b7.

* ci: add name

* Revert "Revert "ci: introduce change to trigger CI""

This reverts commit 6718585fd24069112e0f773e010056e1d96e3eee.

* ci: improve naming

* ci: further improve naming

* Unset reusable workflow version and use relative path

* Remove CI trigger

---------

Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
2024-04-29 14:54:12 +02:00

49 lines
1.6 KiB
YAML

# 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