Skip to content

Commit

Permalink
Remove support for ansible-core 2.15 due EOL (#415)
Browse files Browse the repository at this point in the history
As ansible-core passed EOL, we removed it from the test matrix.
This reduces the size of the default test matrix from 45 to 36.
  • Loading branch information
ssbarnea authored Jan 29, 2025
1 parent 5e3dd99 commit 25143c7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The arguments after the `--` will be passed to the `ansible-test` command. Thus
Same can be done to pass arguments to the `pytest` commands for the `unit-*` and `integration-*` environments:

```bash
tox -e unit-py3.11-2.15 --ansible --conf tox-ansible.ini -- --junit-xml=tests/output/junit/unit.xml
tox -e unit-py3.13-2.18 --ansible --conf tox-ansible.ini -- --junit-xml=tests/output/junit/unit.xml
```

## Usage in a CI/CD pipeline
Expand Down
5 changes: 2 additions & 3 deletions src/tox_ansible/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@
"dirname",
]
ENV_LIST = """
{integration, sanity, unit}-py3.9-{2.15}
{integration, sanity, unit}-py3.10-{2.15, 2.16, 2.17}
{integration, sanity, unit}-py3.11-{2.15, 2.16, 2.17, 2.18, milestone, devel}
{integration, sanity, unit}-py3.10-{2.16, 2.17}
{integration, sanity, unit}-py3.11-{2.16, 2.17, 2.18, milestone, devel}
{integration, sanity, unit}-py3.12-{2.16, 2.17, 2.18, milestone, devel}
{integration, sanity, unit}-py3.13-{2.18, milestone, devel}
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

from _pytest.python import Metafunc

GH_MATRIX_LENGTH = 45
GH_MATRIX_LENGTH = 36


def run(
Expand Down
11 changes: 6 additions & 5 deletions tests/unit/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_check_num_candidates_2(caplog: pytest.LogCaptureFixture) -> None:
Args:
caplog: Pytest fixture.
"""
environment_list = EnvList(envs=["integration-py3.9-py3.9"])
environment_list = EnvList(envs=["integration-py3.13-py3.13"])
with pytest.raises(SystemExit, match="1"):
generate_gh_matrix(environment_list, "all")
logs = caplog.text
Expand Down Expand Up @@ -96,7 +96,8 @@ def test_gen_version_matrix(python: str, tmp_path: Path, monkeypatch: pytest.Mon
tmp_path: Pytest fixture.
monkeypatch: Pytest fixture.
"""
environment_list = EnvList(envs=[f"integration-{python}-2.15"])
av = "2.18"
environment_list = EnvList(envs=[f"integration-{python}-{av}"])
monkeypatch.setenv("GITHUB_ACTIONS", "true")
gh_output = tmp_path / "matrix.json"
monkeypatch.setenv("GITHUB_OUTPUT", str(gh_output))
Expand All @@ -106,9 +107,9 @@ def test_gen_version_matrix(python: str, tmp_path: Path, monkeypatch: pytest.Mon
assert json_string
json_result = json.loads(json_string.group("json"))
assert json_result[0] == {
"description": f"Integration tests using ansible-core 2.15 and python {python[2:]}",
"factors": ["integration", python, "2.15"],
"name": f"integration-{python}-2.15",
"description": f"Integration tests using ansible-core {av} and python {python[2:]}",
"factors": ["integration", python, av],
"name": f"integration-{python}-{av}",
"python": "3.13",
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_type_current(
monkeypatch: pytest fixture to patch modules
module_fixture_dir: pytest fixture to provide a module specific fixture directory
"""
matrix_length = 45
matrix_length = 36
monkeypatch.delenv("GITHUB_ACTIONS", raising=False)
monkeypatch.delenv("GITHUB_OUTPUT", raising=False)
monkeypatch.chdir(module_fixture_dir)
Expand Down

0 comments on commit 25143c7

Please sign in to comment.