From 9cf07070043cb1b3fd6d440e965d2417f037aeb3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 28 Apr 2024 14:20:08 +0200 Subject: [PATCH] ansible-test: Arch Linux switched to Python 3.12 (#74) * Arch Linux switched to Python 3.12. * Run tests with Python 3.12. * Update 'ansible-test integration --help' output. --- .github/workflows/ansible-test.yml | 6 ++--- .github/workflows/execution-environments.yml | 4 ++-- ansible-test/README.md | 24 ++++++++----------- ansible-test/archlinux/build.sh | 2 +- .../defaults/main.yml | 2 +- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 5ef05d4..60e1dfe 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -18,7 +18,7 @@ jobs: matrix: include: - name: archlinux - python: '3.11' + python: '3.12' ansible-core-1: '' ansible-core-2: devel - name: centos-stream8 @@ -38,10 +38,10 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: "3.12" - name: Install dependencies run: | diff --git a/.github/workflows/execution-environments.yml b/.github/workflows/execution-environments.yml index f9a5def..6da4e23 100644 --- a/.github/workflows/execution-environments.yml +++ b/.github/workflows/execution-environments.yml @@ -24,10 +24,10 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: "3.12" - name: Install dependencies run: | diff --git a/ansible-test/README.md b/ansible-test/README.md index e4fe8ca..1c6fbd3 100644 --- a/ansible-test/README.md +++ b/ansible-test/README.md @@ -13,16 +13,12 @@ Some container images are provided and supported by ansible-test, such as the fo ansible-test integration --help # [...] target docker images and supported python version (choose one): - base (3.10, 2.7, 3.5, 3.6, 3.7, 3.8, 3.9) - default (3.10, 2.7, 3.5, 3.6, 3.7, 3.8, 3.9) - alpine3 (3.9) - centos7 (2.7) - fedora34 (3.9) - fedora35 (3.10) - opensuse15py2 (2.7) - opensuse15 (3.6) - ubuntu1804 (3.6) + base (3.12, 3.8, 3.9, 3.10, 3.11) + default (3.12, 3.8, 3.9, 3.10, 3.11) + alpine319 (3.11) + fedora39 (3.12) ubuntu2004 (3.8) + ubuntu2204 (3.10) {image} # python must be specified for custom images # [...] ``` @@ -55,12 +51,12 @@ ansible-test integration --python 3.6 --docker localhost/test-image:centos-strea ## Available images -| image | py27 | py36 | py38 | py39 | py3.10 | py3.11 | Notes | +| image | py27 | py36 | py38 | py39 | py3.10 | py3.11 | py3.12 | Notes | |-------------------|------|------|------|------|--------|--------|---------------------------------------------| -| [archlinux] | | | | | | ✔️ | | -| [centos-stream8] | | ✔️ | | ✔️ | | | Based on [centos8 ansible-test image] | -| [debian-bullseye] | | | | ✔️ | | | Based on [ubuntu2004 ansible-test image] | -| [debian-bookworm] | | | | | | ✔️ | Based on debian-bullseye ansible-test image | +| [archlinux] | | | | | | | ✔️ | | +| [centos-stream8] | | ✔️ | | ✔️ | | | | Based on [centos8 ansible-test image] | +| [debian-bullseye] | | | | ✔️ | | | | Based on [ubuntu2004 ansible-test image] | +| [debian-bookworm] | | | | | | ✔️ | | Based on debian-bullseye ansible-test image | Note that these images from only work with ansible-test from ansible-core 2.14.0 or later. diff --git a/ansible-test/archlinux/build.sh b/ansible-test/archlinux/build.sh index ccdf399..91a762f 100755 --- a/ansible-test/archlinux/build.sh +++ b/ansible-test/archlinux/build.sh @@ -10,7 +10,7 @@ build=$(buildah from docker.io/library/archlinux:latest) buildah run "${build}" -- /bin/bash -c "pacman -Syy && pacman-key --init && pacman -S archlinux-keyring --noconfirm && pacman -Su --noconfirm && pacman -S ${DEPENDENCIES} --noconfirm && pacman -Scc --noconfirm" # Disable PEP 668 marker -buildah run "${build}" -- /bin/bash -c "rm /usr/lib/python3.11/EXTERNALLY-MANAGED" +buildah run "${build}" -- /bin/bash -c "rm /usr/lib/python3.12/EXTERNALLY-MANAGED" # Extra python dependencies buildah run --volume ${SCRIPT_DIR}:/tmp/src:z "${build}" -- /bin/bash -c "pip3 install -r /tmp/src/requirements.txt" diff --git a/roles/build-ansible-test-images/defaults/main.yml b/roles/build-ansible-test-images/defaults/main.yml index 3cf3d13..35a97ad 100644 --- a/roles/build-ansible-test-images/defaults/main.yml +++ b/roles/build-ansible-test-images/defaults/main.yml @@ -6,7 +6,7 @@ images_available: tag: archlinux script: ansible-test/archlinux/build.sh pythons: - - "3.11" + - "3.12" - name: localhost/test-image tag: centos-stream8 script: ansible-test/centos-stream8/build.sh