Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
moreati committed Nov 4, 2024
1 parent 8924470 commit 55d4775
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 63 deletions.
61 changes: 2 additions & 59 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,6 @@ jobs:
fail-fast: false
matrix:
include:
- name: Ans_27_210
tox_env: py27-mode_ansible-ansible2.10
- name: Ans_27_4
tox_env: py27-mode_ansible-ansible4

- name: Ans_36_210
python_version: '3.6'
tox_env: py36-mode_ansible-ansible2.10
- name: Ans_36_4
python_version: '3.6'
tox_env: py36-mode_ansible-ansible4

- name: Ans_311_210
python_version: '3.11'
tox_env: py311-mode_ansible-ansible2.10
- name: Ans_311_3
python_version: '3.11'
tox_env: py311-mode_ansible-ansible3
- name: Ans_311_4
python_version: '3.11'
tox_env: py311-mode_ansible-ansible4
- name: Ans_311_5
python_version: '3.11'
tox_env: py311-mode_ansible-ansible5
- name: Ans_313_6
python_version: '3.13'
tox_env: py313-mode_ansible-ansible6
- name: Ans_313_7
python_version: '3.13'
tox_env: py313-mode_ansible-ansible7
- name: Ans_313_8
python_version: '3.13'
tox_env: py313-mode_ansible-ansible8
- name: Ans_313_9
python_version: '3.13'
tox_env: py313-mode_ansible-ansible9
- name: Ans_313_10
python_version: '3.13'
tox_env: py313-mode_ansible-ansible10
- name: Van_313_10
python_version: '3.13'
tox_env: py313-mode_ansible-ansible10-strategy_linear

- name: Mito_27
tox_env: py27-mode_mitogen
- name: Mito_36
python_version: '3.6'
tox_env: py36-mode_mitogen
- name: Mito_313
python_version: '3.13'
tox_env: py313-mode_mitogen
Expand Down Expand Up @@ -156,30 +108,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
15 changes: 11 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,8 +11,7 @@
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)

Expand All @@ -33,6 +32,7 @@
- cmd: podman info
timeout: 300
register: podman_machine
changed_when: true

- debug:
var: podman_machine
Expand All @@ -41,11 +41,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 +59,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 +71,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 +96,7 @@
loop:
- cmd: podman stop testMitogen
- cmd: podman machine stop
changed_when: true
when:
- ansible_facts.pkg_mgr in ['homebrew']
tags:
Expand Down

0 comments on commit 55d4775

Please sign in to comment.