From bae5f18f5cd8d4e896df1c321e5c0d2e81cceca6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 9 Apr 2020 11:53:34 +0200 Subject: [PATCH] ansible-test: don't trigger full CI run for changes to changelogs/ and docs/ in collections (#68550) * Don't trigger full CI run for changes to changelogs/ and docs/ in collections. * Add changelog fragment. * Update changelogs/fragments/68550-ansible-test-docs-changelogs.yml Co-Authored-By: Matt Clay Co-authored-by: Matt Clay --- .../fragments/68550-ansible-test-docs-changelogs.yml | 2 ++ test/lib/ansible_test/_internal/classification.py | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 changelogs/fragments/68550-ansible-test-docs-changelogs.yml diff --git a/changelogs/fragments/68550-ansible-test-docs-changelogs.yml b/changelogs/fragments/68550-ansible-test-docs-changelogs.yml new file mode 100644 index 00000000000..730d65f093d --- /dev/null +++ b/changelogs/fragments/68550-ansible-test-docs-changelogs.yml @@ -0,0 +1,2 @@ +bugfixes: +- "ansible-test change detection - Run only sanity tests on ``docs/`` and ``changelogs/`` in collections, to avoid triggering full CI runs of integration and unit tests when files in these directories change." diff --git a/test/lib/ansible_test/_internal/classification.py b/test/lib/ansible_test/_internal/classification.py index c0357d59139..3c5dd6a5948 100644 --- a/test/lib/ansible_test/_internal/classification.py +++ b/test/lib/ansible_test/_internal/classification.py @@ -641,6 +641,14 @@ class PathMapper: if result is not None: return result + minimal = {} + + if path.startswith('changelogs/'): + return minimal + + if path.startswith('docs/'): + return minimal + return None def _classify_ansible(self, path): # type: (str) -> t.Optional[t.Dict[str, str]]