Skip to content

Commit

Permalink
WIP: Run CI tests against multiple versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasG0 committed Jan 22, 2025
1 parent dbbe385 commit b44edb4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ jobs:
runs-on:
group: "huge-runners"
timeout-minutes: 30
strategy:
matrix:
version: ["1.0.0", "1.1.0"]
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
Expand All @@ -201,8 +204,13 @@ jobs:
pip install invoke toml codecov
- name: "Install Package"
run: "poetry install --all-extras"
- name: "Set environment variables for python_testcontainers"
run: |
echo INFRAHUB_TESTING_IMAGE_VER=${{ matrix.version }} >> $GITHUB_ENV
- name: "Integration Tests"
run: "poetry run pytest --cov infrahub_sdk tests/integration/"
run: |
echo "Running tests for version: ${{ matrix.version }}"
poetry run pytest --cov infrahub_sdk tests/integration/
- name: "Upload coverage to Codecov"
run: |
codecov --flags integration-tests
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/test_infrahub_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@


class TestInfrahubNode(TestInfrahubDockerClient, SchemaAnimal):
@pytest.fixture(scope="class")
def infrahub_version(self) -> str:
return "1.1.0"

@pytest.fixture(scope="class")
async def base_dataset(
self,
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@


class TestInfrahubNode(TestInfrahubDockerClient, SchemaCarPerson):
@pytest.fixture(scope="class")
def infrahub_version(self) -> str:
return "1.1.0"

@pytest.fixture(scope="class")
async def initial_schema(self, default_branch: str, client: InfrahubClient, schema_base: SchemaRoot) -> None:
await client.schema.wait_until_converged(branch=default_branch)
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from typing import TYPE_CHECKING

import pytest

from infrahub_sdk.testing.docker import TestInfrahubDockerClient
from infrahub_sdk.testing.repository import GitRepo
from infrahub_sdk.utils import get_fixtures_dir
Expand All @@ -13,10 +11,6 @@


class TestInfrahubRepository(TestInfrahubDockerClient):
@pytest.fixture(scope="class")
def infrahub_version(self) -> str:
return "1.1.0"

async def test_add_repository(self, client: InfrahubClient, remote_repos_dir):
src_directory = get_fixtures_dir() / "integration/mock_repo"
repo = GitRepo(name="mock_repo", src_directory=src_directory, dst_directory=remote_repos_dir)
Expand Down

0 comments on commit b44edb4

Please sign in to comment.