Enable collection integration tests on GHA

There are a number of changes here:

- Abstract out a GHA composite action for running the dev environment
- Update the e2e tests to use that new abstracted action
- Introduce a new (matrixed) job for running collection integration
  tests. This splits the jobs up based on filename.
- Collect coverage info and generate an html report that people can
  download easily to see collection coverage info.
- Do some hacks to delete the intermediary coverage file artifacts
  which aren't needed after the job finishes.

Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
Rick Elrod
2023-08-31 00:06:11 -05:00
parent 4466976e10
commit d03a6a809d
11 changed files with 280 additions and 65 deletions

View File

@@ -21,14 +21,14 @@
name: "{{ inv_name }}"
organization: Default
state: present
register: result
register: inv_result
- name: Create a Host
host:
name: "{{ host_name4 }}"
inventory: "{{ inv_name }}"
state: present
register: result
register: host_result
- name: Add Host to Group
group:
@@ -37,16 +37,18 @@
hosts:
- "{{ host_name4 }}"
preserve_existing_hosts: true
register: result
register: group_result
- assert:
that:
- "result is changed"
- inv_result is changed
- host_result is changed
- group_result is changed
- name: Create Group 1
group:
name: "{{ group_name1 }}"
inventory: "{{ result.id }}"
inventory: "{{ inv_result.id }}"
state: present
variables:
foo: bar
@@ -165,18 +167,6 @@
that:
- group1_host_count == "3"
- name: Delete Group 2
group:
name: "{{ group_name2 }}"
inventory: "{{ inv_name }}"
state: absent
register: result
# In this case, group 2 was last a child of group1 so deleting group1 deleted group2
- assert:
that:
- "result is not changed"
- name: Delete Group 3
group:
name: "{{ group_name3 }}"
@@ -200,6 +190,18 @@
that:
- "result is changed"
- name: Delete Group 2
group:
name: "{{ group_name2 }}"
inventory: "{{ inv_name }}"
state: absent
register: result
# In this case, group 2 was last a child of group1 so deleting group1 deleted group2
- assert:
that:
- "result is not changed"
- name: Check module fails with correct msg
group:
name: test-group