Skip to content

Commit 09b6829

Browse files
ci: run tests/integration/test_model.py in a separate job
1 parent 501cc36 commit 09b6829

2 files changed

Lines changed: 47 additions & 1 deletion

File tree

.github/workflows/test.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,29 @@ jobs:
121121
- name: Run integration
122122
# Force one single concurrent test
123123
run: tox -e integration
124+
125+
integration-quarantine:
126+
name: Quarantined Integration Tests
127+
needs: [lint, unit-tests]
128+
timeout-minutes: 150
129+
runs-on: ubuntu-latest
130+
strategy:
131+
matrix:
132+
python:
133+
- "3.10"
134+
steps:
135+
- name: Check out code
136+
uses: actions/checkout@v3
137+
- name: Setup operator environment
138+
uses: charmed-kubernetes/actions-operator@main
139+
with:
140+
provider: lxd
141+
juju-channel: 3.4/stable
142+
- name: Setup Python
143+
uses: actions/setup-python@v4
144+
with:
145+
python-version: ${{ matrix.python }}
146+
- name: Install dependencies
147+
run: pip install tox
148+
- name: Run integration
149+
run: tox -e integration-quarantine

tox.ini

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,25 @@ envdir = {toxworkdir}/py3
6363
commands =
6464
pip install urllib3<2
6565
pip install pylxd
66-
python -m pytest --tb native -ra -v -n 1 -k 'integration' -m 'not serial' {posargs}
66+
python -m pytest \
67+
--tb native \
68+
-ra -v -n 1 \
69+
-k 'integration' \
70+
--ignore {toxinidir}/tests/integration/test_model.py \
71+
-m 'not serial' \
72+
{posargs}
73+
74+
[testenv:integration-quarantine]
75+
envdir = {toxworkdir}/py3
76+
commands =
77+
pip install urllib3<2
78+
pip install pylxd
79+
python -m pytest \
80+
--tb native \
81+
-ra -v -n 1 \
82+
-m 'not serial' \
83+
{posargs} \
84+
{toxinidir}/tests/integration/test_model.py
6785

6886
[testenv:unit]
6987
envdir = {toxworkdir}/py3
@@ -74,6 +92,8 @@ commands =
7492

7593
[testenv:serial]
7694
# tests that can't be run in parallel
95+
# there's one test marked with 'serial'
96+
# it doesn't get run in CI
7797
envdir = {toxworkdir}/py3
7898
commands =
7999
pip install urllib3<2

0 commit comments

Comments
 (0)