summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Elrod <rick@elrod.me>2022-12-21 00:40:08 +0100
committerRick Elrod <rick@elrod.me>2022-12-21 04:40:41 +0100
commitd968b648deaff425dfa755df297b0ae52dfa2992 (patch)
tree34ee99f5396db6458211c8249797d214ed9cfc26
parentMerge pull request #13352 from AlanCoding/dont_pass_subtasks (diff)
downloadawx-d968b648deaff425dfa755df297b0ae52dfa2992.tar.xz
awx-d968b648deaff425dfa755df297b0ae52dfa2992.zip
Run sanity tests outside of our container
Also just ignore one sanity test for the export module, instead of ignoring all of them. Also use latest ansible-test, and make it work on GHA (by using podman instead of docker). Signed-off-by: Rick Elrod <rick@elrod.me>
-rw-r--r--.github/workflows/ci.yml21
-rw-r--r--.github/workflows/e2e_test.yml4
-rw-r--r--Makefile2
-rw-r--r--awx_collection/tests/config.yml3
-rw-r--r--awx_collection/tests/sanity/ignore-2.13.txt88
-rw-r--r--awx_collection/tests/sanity/ignore-2.14.txt1
6 files changed, 24 insertions, 95 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5e9a72392f..97df2050cd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,9 +28,6 @@ jobs:
- name: awx-collection
command: /start_tests.sh test_collection_all
label: Run Collection Tests
- - name: awx-collection-sanity
- command: /start_tests.sh test_collection_sanity
- label: Run Ansible core Collection Sanity tests
- name: api-schema
label: Check API Schema
command: /start_tests.sh detect-schema-change SCHEMA_DIFF_BASE_BRANCH=${{ github.event.pull_request.base.ref }}
@@ -148,3 +145,21 @@ jobs:
env:
AWX_TEST_IMAGE: awx
AWX_TEST_VERSION: ci
+
+ collection-sanity:
+ name: awx_collection sanity
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Upgrade ansible-core
+ run: python3 -m pip install --upgrade ansible-core
+
+ - name: Run sanity tests
+ run: make test_collection_sanity
+ env:
+ # needed due to cgroupsv2. This is fixed, but a stable release
+ # with the fix has not been made yet.
+ ANSIBLE_TEST_PREFER_PODMAN: 1
diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml
index 22890fcf53..788042baed 100644
--- a/.github/workflows/e2e_test.yml
+++ b/.github/workflows/e2e_test.yml
@@ -6,7 +6,7 @@ env:
on:
pull_request_target:
types: [labeled]
-jobs:
+jobs:
e2e-test:
if: contains(github.event.pull_request.labels.*.name, 'qe:e2e')
runs-on: ubuntu-latest
@@ -107,5 +107,3 @@ jobs:
with:
name: AWX-logs-${{ matrix.job }}
path: make-docker-compose-output.log
-
-
diff --git a/Makefile b/Makefile
index 3a85428e93..d86e9779a4 100644
--- a/Makefile
+++ b/Makefile
@@ -339,7 +339,7 @@ test_collection_sanity:
if ! [ -x "$(shell command -v ansible-test)" ]; then pip install ansible-core; fi
ansible --version
COLLECTION_VERSION=1.0.0 make install_collection
- cd $(COLLECTION_INSTALL) && ansible-test sanity --exclude=plugins/modules/export.py
+ cd $(COLLECTION_INSTALL) && ansible-test sanity --docker
test_collection_integration: install_collection
cd $(COLLECTION_INSTALL) && ansible-test integration $(COLLECTION_TEST_TARGET)
diff --git a/awx_collection/tests/config.yml b/awx_collection/tests/config.yml
new file mode 100644
index 0000000000..fdb7c5055c
--- /dev/null
+++ b/awx_collection/tests/config.yml
@@ -0,0 +1,3 @@
+---
+modules:
+ python_requires: '>3'
diff --git a/awx_collection/tests/sanity/ignore-2.13.txt b/awx_collection/tests/sanity/ignore-2.13.txt
deleted file mode 100644
index cd98399548..0000000000
--- a/awx_collection/tests/sanity/ignore-2.13.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-plugins/module_utils/awxkit.py import-3.9
-plugins/module_utils/controller_api.py import-3.9
-plugins/modules/ad_hoc_command.py import-3.9
-plugins/modules/ad_hoc_command_cancel.py import-3.9
-plugins/modules/ad_hoc_command_wait.py import-3.9
-plugins/modules/application.py import-3.9
-plugins/modules/controller_meta.py import-3.9
-plugins/modules/credential.py import-3.92
-plugins/modules/credential_input_source.py import-3.9
-plugins/modules/credential_type.py import-3.9
-plugins/modules/execution_environment.py import-3.9
-plugins/modules/export.py import-3.9
-plugins/modules/group.py import-3.9
-plugins/modules/host.py import-3.9
-plugins/modules/import.py import-3.9
-plugins/modules/instance.py import-3.9
-plugins/modules/instance_group.py import-3.9
-plugins/modules/inventory.py import-3.9
-plugins/modules/inventory_source.py import-3.9
-plugins/modules/inventory_source_update.py import-3.9
-plugins/modules/job_cancel.py import-3.9
-plugins/modules/job_launch.py import-3.9
-plugins/modules/job_list.py import-3.9
-plugins/modules/job_template.py import-3.93
-plugins/modules/job_wait.py import-3.9
-plugins/modules/label.py import-3.9
-plugins/modules/license.py import-3.9
-plugins/modules/notification_template.py import-3.9
-plugins/modules/organization.py import-3.9
-plugins/modules/project.py import-3.92
-plugins/modules/project_update.py import-3.9
-plugins/modules/role.py import-3.9
-plugins/modules/schedule.py import-3.9
-plugins/modules/settings.py import-3.9
-plugins/modules/subscriptions.py import-3.9
-plugins/modules/team.py import-3.9
-plugins/modules/token.py import-3.9
-plugins/modules/user.py import-3.9
-plugins/modules/workflow_approval.py import-3.9
-plugins/modules/workflow_job_template.py import-3.9
-plugins/modules/workflow_job_template_node.py import-3.9
-plugins/modules/workflow_launch.py import-3.9
-plugins/modules/workflow_node_wait.py import-3.9
-plugins/inventory/controller.py import-3.10
-plugins/lookup/controller_api.py import-3.10
-plugins/module_utils/awxkit.py import-3.10
-plugins/module_utils/controller_api.py import-3.10
-plugins/modules/ad_hoc_command.py import-3.10
-plugins/modules/ad_hoc_command_cancel.py import-3.10
-plugins/modules/ad_hoc_command_wait.py import-3.10
-plugins/modules/application.py import-3.10
-plugins/modules/controller_meta.py import-3.10
-plugins/modules/credential.py import-3.10
-plugins/modules/credential_input_source.py import-3.10
-plugins/modules/credential_type.py import-3.10
-plugins/modules/execution_environment.py import-3.10
-plugins/modules/export.py import-3.10
-plugins/modules/group.py import-3.10
-plugins/modules/host.py import-3.10
-plugins/modules/import.py import-3.10
-plugins/modules/instance.py import-3.10
-plugins/modules/instance_group.py import-3.10
-plugins/modules/inventory.py import-3.10
-plugins/modules/inventory_source.py import-3.10
-plugins/modules/inventory_source_update.py import-3.10
-plugins/modules/job_cancel.py import-3.10
-plugins/modules/job_launch.py import-3.10
-plugins/modules/job_list.py import-3.10
-plugins/modules/job_template.py import-3.10
-plugins/modules/job_wait.py import-3.10
-plugins/modules/label.py import-3.10
-plugins/modules/license.py import-3.10
-plugins/modules/notification_template.py import-3.10
-plugins/modules/organization.py import-3.10
-plugins/modules/project.py import-3.10
-plugins/modules/project_update.py import-3.10
-plugins/modules/role.py import-3.10
-plugins/modules/schedule.py import-3.10
-plugins/modules/settings.py import-3.10
-plugins/modules/subscriptions.py import-3.10
-plugins/modules/team.py import-3.10
-plugins/modules/token.py import-3.10
-plugins/modules/user.py import-3.10
-plugins/modules/workflow_approval.py import-3.10
-plugins/modules/workflow_job_template.py import-3.10
-plugins/modules/workflow_job_template_node.py import-3.10
-plugins/modules/workflow_launch.py import-3.10
-plugins/modules/workflow_node_wait.py import-3.10
diff --git a/awx_collection/tests/sanity/ignore-2.14.txt b/awx_collection/tests/sanity/ignore-2.14.txt
new file mode 100644
index 0000000000..19512ea0c1
--- /dev/null
+++ b/awx_collection/tests/sanity/ignore-2.14.txt
@@ -0,0 +1 @@
+plugins/modules/export.py validate-modules:nonexistent-parameter-documented # needs awxkit to construct argspec