Skip to content

Commit b44edb4

Browse files
committed
WIP: Run CI tests against multiple versions
1 parent dbbe385 commit b44edb4

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ jobs:
183183
runs-on:
184184
group: "huge-runners"
185185
timeout-minutes: 30
186+
strategy:
187+
matrix:
188+
version: ["1.0.0", "1.1.0"]
186189
steps:
187190
- name: "Check out repository code"
188191
uses: "actions/checkout@v4"
@@ -201,8 +204,13 @@ jobs:
201204
pip install invoke toml codecov
202205
- name: "Install Package"
203206
run: "poetry install --all-extras"
207+
- name: "Set environment variables for python_testcontainers"
208+
run: |
209+
echo INFRAHUB_TESTING_IMAGE_VER=${{ matrix.version }} >> $GITHUB_ENV
204210
- name: "Integration Tests"
205-
run: "poetry run pytest --cov infrahub_sdk tests/integration/"
211+
run: |
212+
echo "Running tests for version: ${{ matrix.version }}"
213+
poetry run pytest --cov infrahub_sdk tests/integration/
206214
- name: "Upload coverage to Codecov"
207215
run: |
208216
codecov --flags integration-tests

tests/integration/test_infrahub_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616

1717

1818
class TestInfrahubNode(TestInfrahubDockerClient, SchemaAnimal):
19-
@pytest.fixture(scope="class")
20-
def infrahub_version(self) -> str:
21-
return "1.1.0"
22-
2319
@pytest.fixture(scope="class")
2420
async def base_dataset(
2521
self,

tests/integration/test_node.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212

1313
class TestInfrahubNode(TestInfrahubDockerClient, SchemaCarPerson):
14-
@pytest.fixture(scope="class")
15-
def infrahub_version(self) -> str:
16-
return "1.1.0"
17-
1814
@pytest.fixture(scope="class")
1915
async def initial_schema(self, default_branch: str, client: InfrahubClient, schema_base: SchemaRoot) -> None:
2016
await client.schema.wait_until_converged(branch=default_branch)

tests/integration/test_repository.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from typing import TYPE_CHECKING
44

5-
import pytest
6-
75
from infrahub_sdk.testing.docker import TestInfrahubDockerClient
86
from infrahub_sdk.testing.repository import GitRepo
97
from infrahub_sdk.utils import get_fixtures_dir
@@ -13,10 +11,6 @@
1311

1412

1513
class TestInfrahubRepository(TestInfrahubDockerClient):
16-
@pytest.fixture(scope="class")
17-
def infrahub_version(self) -> str:
18-
return "1.1.0"
19-
2014
async def test_add_repository(self, client: InfrahubClient, remote_repos_dir):
2115
src_directory = get_fixtures_dir() / "integration/mock_repo"
2216
repo = GitRepo(name="mock_repo", src_directory=src_directory, dst_directory=remote_repos_dir)

0 commit comments

Comments
 (0)