Skip to content

Commit

Permalink
[MISC] Splitting tests by substrate and product
Browse files Browse the repository at this point in the history
  • Loading branch information
deusebio committed Mar 17, 2023
1 parent 6e9e0b5 commit 769d50b
Show file tree
Hide file tree
Showing 8 changed files with 524 additions and 435 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ jobs:
provider: lxd
- name: integration-k8s
provider: microk8s
name: ${{ matrix.tox-environments.name }}
product:
- kafka
- mysql
- postgresql
- mongodb
name: ${{ matrix.tox-environments.name }}-${{matrix.product}}
needs:
- lint
- unit-test
Expand Down Expand Up @@ -91,6 +96,6 @@ jobs:
echo "mark_expression=not unstable" >> $GITHUB_OUTPUT
fi
- name: Run integration tests
run: tox run -e ${{ matrix.tox-environments.name }} -- -m '${{ steps.select-tests.outputs.mark_expression }}'
run: tox run -e ${{ matrix.tox-environments.name }}-${{matrix.product}} -- -m '${{ steps.select-tests.outputs.mark_expression }}'
env:
CI_PACKED_CHARMS: ${{ needs.build.outputs.charms }}
7 changes: 7 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ async def build_charm(charm_path, bases_index: int = None) -> Path:
return ops_test


@pytest.fixture(scope="module")
async def data_integrator_charm(ops_test: OpsTest) -> Path:
"""Kafka charm used for integration testing."""
charm = await ops_test.build_charm(".")
return charm


@pytest.fixture(scope="module")
async def app_charm(ops_test: OpsTest):
"""Build the application charm."""
Expand Down
Loading

0 comments on commit 769d50b

Please sign in to comment.