22
33name : Tests
44
5- # env:
6- # ANSIBLE_VERBOSITY: 3
7- # MITOGEN_LOG_LEVEL: DEBUG
5+ env :
6+ ANSIBLE_VERBOSITY : 3
7+ MITOGEN_LOG_LEVEL : DEBUG
88
99on :
1010 pull_request :
1515# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
1616# https://github.com/actions/runner-images/blob/main/README.md#software-and-image-support
1717jobs :
18- u2204 :
19- name : u2204 ${{ matrix.tox_env }}
20- # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
21- runs-on : ubuntu-22.04
22- timeout-minutes : 25
23-
24- strategy :
25- fail-fast : false
26- matrix :
27- include :
28- - name : Ans_27_210
29- tox_env : py27-mode_ansible-ansible2.10
30- - name : Ans_27_4
31- tox_env : py27-mode_ansible-ansible4
32-
33- - name : Ans_36_210
34- python_version : ' 3.6'
35- tox_env : py36-mode_ansible-ansible2.10
36- - name : Ans_36_4
37- python_version : ' 3.6'
38- tox_env : py36-mode_ansible-ansible4
39-
40- - name : Mito_27
41- tox_env : py27-mode_mitogen
42- - name : Mito_36
43- python_version : ' 3.6'
44- tox_env : py36-mode_mitogen
45-
46- steps :
47- - uses : actions/checkout@v4
48- - uses : docker/login-action@v3
49- with :
50- registry : ghcr.io
51- username : ${{ github.actor }}
52- password : ${{ secrets.GITHUB_TOKEN }}
53- - name : Install build deps
54- run : |
55- set -o errexit -o nounset -o pipefail
56-
57- PYTHON=$(python -c 'import re; print(re.sub(r"^py([23])([0-9]{1,2}).*", r"python\1.\2", "${{ matrix.tox_env }}"))')
58-
59- if [[ -z $PYTHON ]]; then
60- echo 1>&2 "Python interpreter could not be determined"
61- exit 1
62- fi
63-
64- sudo apt-get update
65-
66- if [[ $PYTHON == "python2.7" ]]; then
67- sudo apt install -y python2-dev sshpass virtualenv
68- elif [[ $PYTHON == "python3.6" ]]; then
69- sudo apt install -y gcc-10 make libbz2-dev liblzma-dev libreadline-dev libsqlite3-dev libssl-dev sshpass virtualenv zlib1g-dev
70- curl --fail --silent --show-error --location https://pyenv.run | bash
71- CC=gcc-10 ~/.pyenv/bin/pyenv install --force 3.6
72- else
73- echo 1>&2 "Python interpreter $PYTHON not available"
74- exit 1
75- fi
76- - name : Show Python versions
77- run : |
78- set -o errexit -o nounset -o pipefail
79-
80- # macOS builders lack a realpath command
81- type python && python -c"import os.path;print(os.path.realpath('$(type -p python)'))" && python --version
82- type python2 && python2 -c"import os.path;print(os.path.realpath('$(type -p python2)'))" && python2 --version
83- type python3 && python3 -c"import os.path;print(os.path.realpath('$(type -p python3)'))" && python3 --version
84- echo
85-
86- if [ -e /usr/bin/python ]; then
87- echo "/usr/bin/python: sys.executable: $(/usr/bin/python -c 'import sys; print(sys.executable)')"
88- fi
89-
90- if [ -e /usr/bin/python2 ]; then
91- echo "/usr/bin/python2: sys.executable: $(/usr/bin/python2 -c 'import sys; print(sys.executable)')"
92- fi
93-
94- if [ -e /usr/bin/python2.7 ]; then
95- echo "/usr/bin/python2.7: sys.executable: $(/usr/bin/python2.7 -c 'import sys; print(sys.executable)')"
96- fi
97- - name : Install tooling
98- run : |
99- set -o errexit -o nounset -o pipefail
100-
101- # Tox environment name (e.g. py312-mode_mitogen) -> Python executable name (e.g. python3.12)
102- PYTHON=$(python -c 'import re; print(re.sub(r"^py([23])([0-9]{1,2}).*", r"python\1.\2", "${{ matrix.tox_env }}"))')
103-
104- if [[ -z $PYTHON ]]; then
105- echo 1>&2 "Python interpreter could not be determined"
106- exit 1
107- fi
108-
109- if [[ $PYTHON == "python2.7" ]]; then
110- curl "https://bootstrap.pypa.io/pip/2.7/get-pip.py" --output "get-pip.py"
111- "$PYTHON" get-pip.py --user --no-python-version-warning
112- # Avoid Python 2.x pip masking system pip
113- rm -f ~/.local/bin/{easy_install,pip,wheel}
114- elif [[ $PYTHON == "python3.6" ]]; then
115- PYTHON="$HOME/.pyenv/versions/3.6.15/bin/python3.6"
116- fi
117-
118- "$PYTHON" -m pip install -r "tests/requirements-tox.txt"
119- - name : Run tests
120- env :
121- GITHUB_ACTOR : ${{ github.actor }}
122- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
123- run : |
124- set -o errexit -o nounset -o pipefail
125-
126- # Tox environment name (e.g. py312-mode_mitogen) -> Python executable name (e.g. python3.12)
127- PYTHON=$(python -c 'import re; print(re.sub(r"^py([23])([0-9]{1,2}).*", r"python\1.\2", "${{ matrix.tox_env }}"))')
128-
129- if [[ -z $PYTHON ]]; then
130- echo 1>&2 "Python interpreter could not be determined"
131- exit 1
132- fi
133-
134- if [[ $PYTHON == "python3.6" ]]; then
135- PYTHON="$HOME/.pyenv/versions/3.6.15/bin/python3.6"
136- fi
137-
138- "$PYTHON" -m tox -e "${{ matrix.tox_env }}"
139-
140- u2404 :
141- name : u2404 ${{ matrix.tox_env }}
142- # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
143- runs-on : ubuntu-24.04
144- timeout-minutes : 25
145-
146- strategy :
147- fail-fast : false
148- matrix :
149- include :
150- - name : Ans_311_210
151- python_version : ' 3.11'
152- tox_env : py311-mode_ansible-ansible2.10
153- - name : Ans_311_3
154- python_version : ' 3.11'
155- tox_env : py311-mode_ansible-ansible3
156- - name : Ans_311_4
157- python_version : ' 3.11'
158- tox_env : py311-mode_ansible-ansible4
159- - name : Ans_311_5
160- python_version : ' 3.11'
161- tox_env : py311-mode_ansible-ansible5
162- - name : Ans_313_6
163- python_version : ' 3.13'
164- tox_env : py313-mode_ansible-ansible6
165- - name : Ans_313_7
166- python_version : ' 3.13'
167- tox_env : py313-mode_ansible-ansible7
168- - name : Ans_313_8
169- python_version : ' 3.13'
170- tox_env : py313-mode_ansible-ansible8
171- - name : Ans_313_9
172- python_version : ' 3.13'
173- tox_env : py313-mode_ansible-ansible9
174- - name : Ans_313_10
175- python_version : ' 3.13'
176- tox_env : py313-mode_ansible-ansible10
177- - name : Ans_313_11
178- python_version : ' 3.13'
179- tox_env : py313-mode_ansible-ansible11
180- - name : Ans_313_12
181- python_version : ' 3.13'
182- tox_env : py313-mode_ansible-ansible12
183-
184- - name : Van_313_11
185- python_version : ' 3.13'
186- tox_env : py313-mode_ansible-ansible11-strategy_linear
187- - name : Van_313_12
188- python_version : ' 3.13'
189- tox_env : py313-mode_ansible-ansible12-strategy_linear
190-
191- - name : Mito_313
192- python_version : ' 3.13'
193- tox_env : py313-mode_mitogen
194-
195- steps :
196- - uses : actions/checkout@v4
197- - uses : actions/setup-python@v5
198- with :
199- python-version : ${{ matrix.python_version }}
200- if : ${{ matrix.python_version }}
201- - uses : docker/login-action@v3
202- with :
203- registry : ghcr.io
204- username : ${{ github.actor }}
205- password : ${{ secrets.GITHUB_TOKEN }}
206- - name : Install build deps
207- run : |
208- set -o errexit -o nounset -o pipefail
209-
210- sudo apt-get update
211- sudo apt-get install -y sshpass virtualenv
212- - name : Show Python versions
213- run : |
214- set -o errexit -o nounset -o pipefail
215-
216- # macOS builders lack a realpath command
217- type python && python -c"import os.path;print(os.path.realpath('$(type -p python)'))" && python --version
218- type python2 && python2 -c"import os.path;print(os.path.realpath('$(type -p python2)'))" && python2 --version
219- type python3 && python3 -c"import os.path;print(os.path.realpath('$(type -p python3)'))" && python3 --version
220- echo
221-
222- if [ -e /usr/bin/python ]; then
223- echo "/usr/bin/python: sys.executable: $(/usr/bin/python -c 'import sys; print(sys.executable)')"
224- fi
225-
226- if [ -e /usr/bin/python2 ]; then
227- echo "/usr/bin/python2: sys.executable: $(/usr/bin/python2 -c 'import sys; print(sys.executable)')"
228- fi
229-
230- if [ -e /usr/bin/python2.7 ]; then
231- echo "/usr/bin/python2.7: sys.executable: $(/usr/bin/python2.7 -c 'import sys; print(sys.executable)')"
232- fi
233- - name : Install tooling
234- run : |
235- set -o errexit -o nounset -o pipefail
236-
237- # Tox environment name (e.g. py312-mode_mitogen) -> Python executable name (e.g. python3.12)
238- PYTHON=$(python -c 'import re; print(re.sub(r"^py([23])([0-9]{1,2}).*", r"python\1.\2", "${{ matrix.tox_env }}"))')
239-
240- if [[ -z $PYTHON ]]; then
241- echo 1>&2 "Python interpreter could not be determined"
242- exit 1
243- fi
244-
245- "$PYTHON" -m pip install -r "tests/requirements-tox.txt"
246- - name : Run tests
247- env :
248- GITHUB_ACTOR : ${{ github.actor }}
249- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
250- run : |
251- set -o errexit -o nounset -o pipefail
252-
253- # Tox environment name (e.g. py312-mode_mitogen) -> Python executable name (e.g. python3.12)
254- PYTHON=$(python -c 'import re; print(re.sub(r"^py([23])([0-9]{1,2}).*", r"python\1.\2", "${{ matrix.tox_env }}"))')
255-
256- if [[ -z $PYTHON ]]; then
257- echo 1>&2 "Python interpreter could not be determined"
258- exit 1
259- fi
260-
261- "$PYTHON" -m tox -e "${{ matrix.tox_env }}"
262-
26318 macos :
26419 name : macos ${{ matrix.tox_env }}
26520 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
@@ -279,12 +34,6 @@ jobs:
27934 - name : Van_313_11
28035 tox_env : py313-mode_localhost-ansible11-strategy_linear
28136
282- - name : Loc_313_12
283- tox_env : py313-mode_localhost-ansible12
284-
285- - name : Van_313_12
286- tox_env : py313-mode_localhost-ansible12-strategy_linear
287-
28837 steps :
28938 - uses : actions/checkout@v4
29039 - uses : actions/setup-python@v5
@@ -351,8 +100,6 @@ jobs:
351100 check :
352101 if : always()
353102 needs :
354- - u2204
355- - u2404
356103 - macos
357104 runs-on : ubuntu-latest
358105 steps :
0 commit comments