Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: serialise integration tests and quarantine problematic tests #1149

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,29 @@ jobs:
- name: Run integration
# Force one single concurrent test
run: tox -e integration

integration-quarantine:
name: Quarantined Integration Tests
needs: [lint, unit-tests]
timeout-minutes: 150
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.10"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3.4/stable
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run integration
run: tox -e integration-quarantine
2 changes: 2 additions & 0 deletions tests/integration/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ async def test_deploy_local_bundle_with_overlay_multi():

@base.bootstrapped
@pytest.mark.bundle
@pytest.mark.skip("Always fails -- investigate bundle charms")
async def test_deploy_bundle_with_overlay_as_argument():
async with base.CleanModel() as model:
overlay_path = OVERLAYS_DIR / 'test-overlay.yaml'
Expand Down Expand Up @@ -342,6 +343,7 @@ async def test_deploy_bundle_with_multi_overlay_as_argument():

@base.bootstrapped
@pytest.mark.bundle
@pytest.mark.skip("Always fails -- investigate bundle charms")
async def test_deploy_bundle_with_multiple_overlays_with_include_files():
async with base.CleanModel() as model:
bundle_yaml_path = TESTS_DIR / 'integration' / 'bundle' / 'bundle.yaml'
Expand Down
24 changes: 23 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,27 @@ envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
pip install pylxd
python -m pytest --tb native -ra -v -n auto -k 'integration' -m 'not serial' {posargs}
python -m pytest \
--tb native \
-ra -v -n 1 \
-k 'integration' \
--ignore {toxinidir}/tests/integration/test_crossmodel.py \
--ignore {toxinidir}/tests/integration/test_model.py \
-m 'not serial' \
{posargs}

[testenv:integration-quarantine]
envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
pip install pylxd
python -m pytest \
--tb native \
-ra -v -n 1 \
-m 'not serial' \
{posargs} \
{toxinidir}/tests/integration/test_crossmodel.py \
{toxinidir}/tests/integration/test_model.py

[testenv:unit]
envdir = {toxworkdir}/py3
Expand All @@ -74,6 +94,8 @@ commands =

[testenv:serial]
# tests that can't be run in parallel
# there's one test marked with 'serial'
# it doesn't get run in CI
envdir = {toxworkdir}/py3
commands =
pip install urllib3<2
Expand Down
Loading