summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fontein <felix@fontein.de>2020-06-11 00:16:01 +0200
committerGitHub <noreply@github.com>2020-06-10 15:16:01 -0700
commitabbb8c4ea842a7649a31658aba946e6b985a2485 (patch)
treefd920a872a65dc794d104c2cd5beadeed24055d7
parent6280bd7af2ee3ae212010a5c7883cc9cd09a7dbe (diff)
downloadansible-abbb8c4ea842a7649a31658aba946e6b985a2485.tar.gz
ansible-test: don't trigger full CI run for changes to changelogs/ and docs/ in collections (#68550) (#69408)
* 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 <matt@mystile.com> Co-authored-by: Matt Clay <matt@mystile.com> (cherry picked from commit bae5f18f5cd8d4e896df1c321e5c0d2e81cceca6)
-rw-r--r--changelogs/fragments/68550-ansible-test-docs-changelogs.yml2
-rw-r--r--test/lib/ansible_test/_internal/classification.py8
2 files changed, 10 insertions, 0 deletions
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 0000000000..730d65f093
--- /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 f7126ee475..011f5a69e4 100644
--- a/test/lib/ansible_test/_internal/classification.py
+++ b/test/lib/ansible_test/_internal/classification.py
@@ -644,6 +644,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]]