File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,11 +277,6 @@ jobs:
277277 # We use pytest-xdist to make this run much faster.
278278 # The downside is that we cannot use -s / --capture=no.
279279 #
280- # We use coverage to collect coverage data but we currently
281- # do not upload / use it because combining Windows and Linux
282- # coverage is challenging.
283- #
284- # We therefore have a few ``# pragma: no cover`` statements.
285280 uv run --extra=dev \
286281 coverage run -m pytest \
287282 --skip-real \
@@ -292,6 +287,14 @@ jobs:
292287 env :
293288 UV_PYTHON : ${{ matrix.python-version }}
294289
290+ - name : Upload coverage data
291+ uses : actions/upload-artifact@v7
292+ with :
293+ name : coverage-data-windows-${{ matrix.python-version }}
294+ path : .coverage.*
295+ include-hidden-files : true
296+ if-no-files-found : error
297+
295298 coverage :
296299 name : Combine & check coverage
297300 needs : [ci-tests, skip-tests, windows-tests]
Original file line number Diff line number Diff line change @@ -380,6 +380,8 @@ run.omit = [
380380 " src/mock_vws/_flask_server/healthcheck.py" ,
381381]
382382run.parallel = true
383+ run.patch = [ " subprocess" ]
384+ run.relative_files = true
383385run.source = [ " ci/" , " src/" , " tests/" ]
384386report.exclude_also = [
385387 " class .*\\ bProtocol\\ ):" ,
Original file line number Diff line number Diff line change @@ -90,9 +90,7 @@ def fixture_custom_bridge_network() -> Iterator[Network]:
9090 name = "test-vws-bridge-" + uuid .uuid4 ().hex
9191 try :
9292 network = client .networks .create (name = name , driver = "bridge" )
93- # We skip coverage here because combining Windows and Linux coverage
94- # is challenging.
95- except NotFound : # pragma: no cover
93+ except NotFound :
9694 # On Windows the "bridge" network driver is not available and we use
9795 # the "nat" driver instead.
9896 network = client .networks .create (name = name , driver = "nat" )
@@ -145,9 +143,7 @@ def test_build_and_run(
145143 target = "target-manager" ,
146144 rm = True ,
147145 )
148- # We skip coverage here because combining Windows and Linux coverage
149- # is challenging.
150- except BuildError as exc : # pragma: no cover
146+ except BuildError as exc :
151147 full_log = "\n " .join (
152148 [item ["stream" ] for item in exc .build_log if "stream" in item ],
153149 )
@@ -161,7 +157,7 @@ def test_build_and_run(
161157 windows_message_substring in exc .msg
162158 for windows_message_substring in windows_message_substrings
163159 ):
164- raise AssertionError (full_log ) from exc
160+ raise AssertionError (full_log ) from exc # pragma: no cover
165161 pytest .skip (
166162 reason = "We do not currently support using Windows containers."
167163 )
You can’t perform that action at this time.
0 commit comments