From 3aca3936392e49acaac35071c3029e5f8b7541e5 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sun, 12 Nov 2023 23:04:06 -0600 Subject: [PATCH] build-release: directly install the wheel for testing (#553) We should test the wheel we build and ship to users instead of having pip build a new one from the sdist. Also, this makes this task more efficient. Unpacking the sdist, building the wheel, and then unpacking and installing that wheel takes a while for a large package such as ansible. --- changelogs/fragments/553-release-wheel-test.yaml | 4 ++++ roles/build-release/tasks/tests.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/553-release-wheel-test.yaml diff --git a/changelogs/fragments/553-release-wheel-test.yaml b/changelogs/fragments/553-release-wheel-test.yaml new file mode 100644 index 00000000..99b671e1 --- /dev/null +++ b/changelogs/fragments/553-release-wheel-test.yaml @@ -0,0 +1,4 @@ +--- +minor_changes: + - build-release role - directly install the wheel when running tests + (https://github.com/ansible-community/antsibull/pull/553). diff --git a/roles/build-release/tasks/tests.yaml b/roles/build-release/tasks/tests.yaml index b35ceda1..ecc5d2fd 100644 --- a/roles/build-release/tasks/tests.yaml +++ b/roles/build-release/tasks/tests.yaml @@ -17,9 +17,9 @@ ansible.builtin.set_fact: _python_version: "python{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}" -- name: Install the release tarball in a virtualenv so we can test it +- name: Install the release wheel in a virtualenv so we can test it ansible.builtin.pip: - name: "file://{{ _release_archive }}" + name: "file://{{ _release_wheel }}" state: present virtualenv: "{{ antsibull_ansible_venv }}" virtualenv_command: "{{ ansible_python.executable }} -m venv"