Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Migrate to from macOS 12 to 13 test runners #1176

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,30 +156,21 @@ jobs:
"$PYTHON" -m tox -e "${{ matrix.tox_env }}"

macos:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
runs-on: macos-12
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
runs-on: macos-13
timeout-minutes: 120

strategy:
fail-fast: false
matrix:
include:
- name: Mito_27
tox_env: py27-mode_mitogen
- name: Mito_313
python_version: '3.13'
tox_env: py313-mode_mitogen

- name: Loc_27_210
tox_env: py27-mode_localhost-ansible2.10
- name: Loc_313_10
python_version: '3.13'
tox_env: py313-mode_localhost-ansible10

- name: Van_27_210
tox_env: py27-mode_localhost-ansible2.10-strategy_linear
- name: Van_313_10
python_version: '3.13'
tox_env: py313-mode_localhost-ansible10-strategy_linear

steps:
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ In progress (unreleased)
(``ansible_ssh_executable``).
* :gh:issue:`1083` :mod:`ansible_mitogen`: Fixed templated connection options
during a ``meta: reset_connection`` task.
* :gh:issue:`1129` CI: Migrated macOS 12 runners to macOS 13, due to EOL.


v0.3.15 (2024-10-28)
Expand Down
21 changes: 17 additions & 4 deletions tests/ansible/regression/issue_655__wait_for_connection_error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
tasks:
- meta: end_play
when:
# TODO CI currently runs on macOS 12 & which isn't supported by Podman
# version available in Homebrew.
# Podman versions available in Homebrew have dropped macOS 12 support.
- ansible_facts.system == 'Darwin'
- ansible_facts.distribution_version is version('13.0', '<', strict=True)

- meta: end_play
when:
# Ansible 10 (ansible-core 2.17+) require Python 3.7+ on targets.
# On CentOS 8 /usr/libexec/platform-python is Python 3.6
- ansible_version.full is version('2.17', '>=', strict=True)

- name: set up test container and run tests inside it
block:
- name: install deps
Expand All @@ -33,6 +38,7 @@
- cmd: podman info
timeout: 300
register: podman_machine
changed_when: true

- debug:
var: podman_machine
Expand All @@ -41,11 +47,13 @@
- name: create container
command:
cmd: podman run --name testMitogen -d --rm centos:8 bash -c "sleep infinity & wait"
changed_when: true

- name: add container to inventory
add_host:
name: testMitogen
ansible_connection: podman
ansible_python_interpreter: /usr/libexec/platform-python # Python 3.6
ansible_user: root
changed_when: false
environment:
Expand All @@ -57,6 +65,7 @@
- name: create test file
file:
path: /var/run/reboot-required
mode: u=rw,go=r
state: touch

- name: Check if reboot is required
Expand All @@ -68,13 +77,16 @@
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
when: reboot_required.stat.exists == True
changed_when: true
when:
- reboot_required.stat.exists

- name: Wait 300 seconds for server to become available
wait_for_connection:
delay: 30
timeout: 300
when: reboot_required.stat.exists == True
when:
- reboot_required.stat.exists

- name: cleanup test file
file:
Expand All @@ -90,6 +102,7 @@
loop:
- cmd: podman stop testMitogen
- cmd: podman machine stop
changed_when: true
when:
- ansible_facts.pkg_mgr in ['homebrew']
tags:
Expand Down