summaryrefslogtreecommitdiff
path: root/ci/coverage.ps1
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-11-01 15:06:13 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-11-16 19:28:24 -0500
commit68a84f6535de738a71efd9d413ca43371d165219 (patch)
treecc075e2683e2a4384270fe577c2516939a132891 /ci/coverage.ps1
parent47d1a55e780f928c9c1613220d6267de530e64b4 (diff)
downloadmeson-68a84f6535de738a71efd9d413ca43371d165219.tar.gz
fix confusing azure pipelines status for coverage
The coverage report was always the final section of the main test run. This made it hard to scroll around and find exactly what went wrong -- particularly as not everyone realizes that coverage isn't part of the test run, but also because the output from coverage is... excessively long. This mirrors what we do in our other workflows.
Diffstat (limited to 'ci/coverage.ps1')
-rw-r--r--ci/coverage.ps114
1 files changed, 14 insertions, 0 deletions
diff --git a/ci/coverage.ps1 b/ci/coverage.ps1
new file mode 100644
index 000000000..ebd7cd4c3
--- /dev/null
+++ b/ci/coverage.ps1
@@ -0,0 +1,14 @@
+echo ""
+echo ""
+echo "=== Gathering coverage report ==="
+echo ""
+
+python3 -m coverage combine
+python3 -m coverage xml
+python3 -m coverage report
+
+# Currently codecov.py does not handle Azure, use this fork of a fork to get it
+# working without requiring a token
+git clone https://github.com/mensinda/codecov-python
+python3 -m pip install --ignore-installed ./codecov-python
+python3 -m codecov -f .coverage/coverage.xml -n "VS$env:compiler $env:arch $env:backend" -c $env:SOURCE_VERSION