CI: Migrate macOS integration tests to macOS 12, drop Python 2.7 jobs

macOS 11 is not longer an available runner on Azure Devops. The minimum is now
macOS 12. This runner does not have Python 2.7 installed, so running them
would require a custom install - which I'm declaring too much effort for too
little gain.

refs #1090
pull/1091/head
Alex Willmer 4 months ago
parent f5a8840668
commit 924dbd6f0c

@ -16,32 +16,21 @@ trigger:
- docs-master - docs-master
jobs: jobs:
- job: mac11 - job: mac12
# vanilla Ansible is really slow # vanilla Ansible is really slow
timeoutInMinutes: 120 timeoutInMinutes: 120
steps: steps:
- template: azure-pipelines-steps.yml - template: azure-pipelines-steps.yml
pool: pool:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
vmImage: macOS-11 vmImage: macOS-12
strategy: strategy:
matrix: matrix:
Mito_27:
tox.env: py27-mode_mitogen
Mito_312: Mito_312:
python.version: '3.12'
tox.env: py312-mode_mitogen tox.env: py312-mode_mitogen
Loc_27_210:
tox.env: py27-mode_localhost-ansible2.10
Loc_312_9: Loc_312_9:
python.version: '3.12'
tox.env: py312-mode_localhost-ansible9 tox.env: py312-mode_localhost-ansible9
Van_27_210:
tox.env: py27-mode_localhost-ansible2.10-strategy_linear
Van_312_9: Van_312_9:
python.version: '3.12'
tox.env: py312-mode_localhost-ansible9-strategy_linear tox.env: py312-mode_localhost-ansible9-strategy_linear
- job: Linux - job: Linux

@ -25,6 +25,7 @@ Unreleased
* :gh:issue:`957` Fix Ansible exception when executing against 10s of hosts * :gh:issue:`957` Fix Ansible exception when executing against 10s of hosts
"ValueError: filedescriptor out of range in select()" "ValueError: filedescriptor out of range in select()"
* :gh:issue:`1066` Support Ansible `ansible_host_key_checking` & `ansible_ssh_host_key_checking` * :gh:issue:`1066` Support Ansible `ansible_host_key_checking` & `ansible_ssh_host_key_checking`
* :gh:issue:`1090` CI: Migrate macOS integration tests to macOS 12, drop Python 2.7 jobs
v0.3.7 (2024-04-08) v0.3.7 (2024-04-08)

@ -21,8 +21,7 @@
# sudo-1.8.6p3-29.el6_10.3 on RHEL & CentOS 6.10 (final release) # sudo-1.8.6p3-29.el6_10.3 on RHEL & CentOS 6.10 (final release)
# removed user/group error messages, as defence against CVE-2019-14287. # removed user/group error messages, as defence against CVE-2019-14287.
- >- - >-
'sudo: unknown user: slartibartfast' in out.module_stdout | default(out.msg) (out.module_stderr | default(out.module_stdout, true) | default(out.msg, true)) is search('sudo: unknown user:? slartibartfast')
or 'sudo: unknown user: slartibartfast' in out.module_stderr | default(out.msg)
or (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_version == '6.10') or (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_version == '6.10')
fail_msg: out={{out}} fail_msg: out={{out}}
when: when:

@ -1,4 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python
# I am an Ansible Python JSONARGS module. I should receive an encoding string. # I am an Ansible Python JSONARGS module. I should receive an encoding string.
json_arguments = """<<INCLUDE_ANSIBLE_MODULE_JSON_ARGS>>""" json_arguments = """<<INCLUDE_ANSIBLE_MODULE_JSON_ARGS>>"""

@ -1,4 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python
# #591: call os.getcwd() before AnsibleModule ever gets a chance to fix up the # #591: call os.getcwd() before AnsibleModule ever gets a chance to fix up the
# process environment. # process environment.

@ -1,4 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python
# I am an Ansible Python WANT_JSON module. I should receive a JSON-encoded file. # I am an Ansible Python WANT_JSON module. I should receive a JSON-encoded file.
import json import json

@ -19,9 +19,6 @@
# Will crash if process has a nonexistent CWD. # Will crash if process has a nonexistent CWD.
- custom_python_os_getcwd: - custom_python_os_getcwd:
script: |
import os
self._connection.get_chain().call(os.getcwd)
tags: tags:
- issue_591 - issue_591
- mitogen_only - mitogen_only

@ -11,11 +11,10 @@
tasks: tasks:
- meta: end_play - meta: end_play
when: when:
# TODO CI currently runs on macOS 11 images in Azure DevOps. MacOS 11 # TODO CI currently runs on macOS 12 & which isn't supported by Podman
# is no longer supported by homebrew, so the following install # version available in Homebrew.
# task fails.
- ansible_facts.system == 'Darwin' - ansible_facts.system == 'Darwin'
- ansible_facts.distribution_major_version == '11' - ansible_facts.distribution_version is version('13.0', '<', strict=True)
- name: set up test container and run tests inside it - name: set up test container and run tests inside it
block: block:

@ -1,3 +1,6 @@
import os
import unittest
import mitogen.core import mitogen.core
import testlib import testlib
@ -7,6 +10,10 @@ import simple_pkg.ping
# TODO: this is a joke. 2/3 interop is one of the hardest bits to get right. # TODO: this is a joke. 2/3 interop is one of the hardest bits to get right.
# There should be 100 tests in this file. # There should be 100 tests in this file.
@unittest.skipIf(
os.uname()[0] == 'Darwin' and int(os.uname()[2].partition('.')[0]) >= 21,
"Python 2.x not shipped on macOS 12.3+ (Darwin 21.4+, Monterey)",
)
class TwoThreeCompatTest(testlib.RouterMixin, testlib.TestCase): class TwoThreeCompatTest(testlib.RouterMixin, testlib.TestCase):
if mitogen.core.PY3: if mitogen.core.PY3:
python_path = 'python2' python_path = 'python2'

Loading…
Cancel
Save