Skip to content

Commit

Permalink
ansible-test: Arch Linux switched to Python 3.12 (#74)
Browse files Browse the repository at this point in the history
* Arch Linux switched to Python 3.12.

* Run tests with Python 3.12.

* Update 'ansible-test integration --help' output.
  • Loading branch information
felixfontein authored Apr 28, 2024
1 parent f057262 commit 9cf0707
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/execution-environments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
24 changes: 10 additions & 14 deletions ansible-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
# [...]
```
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ansible-test/archlinux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion roles/build-ansible-test-images/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cf0707

Please sign in to comment.