From 3ff77b8ae3af85dd8d70f0ebeffdf3c4d2231034 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Wed, 17 Apr 2024 11:22:31 +0200 Subject: [PATCH] build-collection.yml: Update contents of testing.md Update the contents of testing.md so they make sense in a downstream context. Signed-off-by: Felix Matouschek --- build-collection.yml | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/build-collection.yml b/build-collection.yml index 5b6f061..714623f 100644 --- a/build-collection.yml +++ b/build-collection.yml @@ -108,7 +108,42 @@ - CONTRIBUTING.md - docs/CONTRIBUTING.md - docs/developing.md - - docs/testing.md + - name: Set content of downstream testing.md + ansible.builtin.copy: + dest: "{{ downstream_project }}/docs/testing.md" + content: | + # Testing + + ## Sanity and unit tests + + Sanity and unit tests can be run with `ansible-test`. + + ### Running tests with ansible-test + + Run sanity tests with `ansible-test` like so: + + ``` + ANSIBLE_TEST_PREFER_PODMAN=1 ansible-test sanity --docker + ``` + + Run unit tests with `ansible-test` like so: + + ``` + ANSIBLE_TEST_PREFER_PODMAN=1 ansible-test units --docker + ``` + + ## Integration tests + + Integration tests require a working cluster and can be run with + `ansible-test`. + + ### Running integration tests with ansible-test + + Run integration tests with `ansible-test` like so: + + ``` + ansible-test integration + ``` - name: Rebuild downstream collection ansible.builtin.command: ansible-galaxy collection build --force . args: