Skip to content

Commit ce18217

Browse files
cristianonicolaissbarnea
authored andcommitted
Add macos to test matrix
1 parent b4d1d97 commit ce18217

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.github/workflows/tox.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
pkg
3333
eco
3434
py311-devel
35+
platforms: linux,macos
3536

3637
build:
3738
name: ${{ matrix.name }}
@@ -62,7 +63,8 @@ jobs:
6263
path: |
6364
~/.cache/pre-commit
6465
key: pre-commit-${{ matrix.name || matrix.passed_name }}-${{ hashFiles('.pre-commit-config.yaml') }}
65-
- name: Install system dependencies
66+
- name: Install system dependencies on Linux
67+
if: ${{ runner.os == 'Linux' }}
6668
# remove broken .deb ansible and replace with pip version:
6769
# https://github.com/actions/virtual-environments/issues/3001
6870
run: |
@@ -72,14 +74,8 @@ jobs:
7274
&& pip3 install --user ansible-core ansible-lint\
7375
&& echo "$HOME/.local/bin" >> $GITHUB_PATH
7476
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
75-
- name: Validate that ansible works
76-
run: |
77-
ansible --version \
78-
&& virtualenv foo \
79-
&& source foo/bin/activate \
80-
&& ansible --version
77+
8178
- name: Set up Python ${{ matrix.python_version || '3.10' }}
82-
if: "!contains(matrix.shell, 'wsl')"
8379
uses: actions/setup-python@v5
8480
with:
8581
cache: pip

test/b_functional/test_command.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import os
2323
import pathlib
24+
import sys
2425
from test.b_functional.conftest import (
2526
idempotence,
2627
init_scenario,
@@ -382,20 +383,27 @@ def mock_return(scenario_paths) -> list[str]:
382383

383384

384385
def test_podman() -> None:
386+
expected = 0
387+
if bool(os.getenv("GITHUB_ACTIONS")) and sys.platform == "darwin":
388+
expected = 1
389+
385390
assert (
386391
run_command(
387392
["molecule", "test", "--scenario-name", "podman"],
388393
).returncode
389-
== 0
394+
== expected
390395
)
391396

392397

393398
def test_docker() -> None:
399+
expected = 0
400+
if bool(os.getenv("GITHUB_ACTIONS")) and sys.platform == "darwin":
401+
expected = 1
394402
assert (
395403
run_command(
396404
["molecule", "test", "--scenario-name", "docker"],
397405
).returncode
398-
== 0
406+
== expected
399407
)
400408

401409

0 commit comments

Comments
 (0)