Skip to content

Commit 70c9cf4

Browse files
committed
Collect coverage on Windows
1 parent db16fba commit 70c9cf4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/windows-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,9 @@ jobs:
4545
env:
4646
SKIP_REAL: 1
4747
run: |
48-
pytest -s -vvv tests/mock_vws/${{ matrix.ci_pattern }}
48+
pytest -s -vvv --exitfirst --cov=src/ --cov=tests --cov-report=xml tests/mock_vws/${{ matrix.ci_pattern }}
49+
50+
- name: "Upload coverage to Codecov"
51+
uses: "codecov/[email protected]"
52+
with:
53+
fail_ci_if_error: true

tests/mock_vws/test_docker.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ def fixture_custom_bridge_network() -> Iterator[Network]:
2828
name='test-vws-bridge-' + uuid.uuid4().hex,
2929
driver='bridge',
3030
)
31-
except docker.errors.NotFound: # pragma: no cover
31+
except docker.errors.NotFound:
3232
# On Windows the "bridge" network driver is not available and we use
3333
# the "nat" driver instead.
34-
#
35-
# We do not track this coverage because the coverage tracked build is
36-
# on Linux.
3734
network = client.networks.create(
3835
name='test-vws-bridge-' + uuid.uuid4().hex,
3936
driver='nat',
@@ -73,9 +70,7 @@ def test_build_and_run(
7370
dockerfile=str(base_dockerfile),
7471
tag=base_tag,
7572
)
76-
except docker.errors.BuildError as exc: # pragma: no cover
77-
# We do not track this coverage because the coverage tracked build is
78-
# on Linux.
73+
except docker.errors.BuildError as exc:
7974
assert 'no matching manifest for windows/amd64' in str(exc)
8075
reason = 'We do not currently support using Windows containers.'
8176
pytest.skip(reason)

0 commit comments

Comments
 (0)