From 6e4aba7d5a1903efb4f5552d95117b27a1524967 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Mon, 12 Feb 2024 22:57:06 +0100 Subject: [PATCH] ci: collect code coverage for install tests Include code coverage for `setup.py`. Signed-off-by: Benjamin Drung --- .github/workflows/ci.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 87bf666..af0b850 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,11 +27,22 @@ jobs: run: > apt-get update && apt-get install --no-install-recommends --yes - pandoc python3 python3-ruamel.yaml python3-setuptools + pandoc python3 python3-coverage python3-ruamel.yaml python3-setuptools - name: Run build - run: python3 setup.py build + run: python3 -m coverage run --branch setup.py build - name: Run install - run: python3 setup.py install + run: python3 -m coverage run -a --branch setup.py install + - name: Coverage report + run: python3 -m coverage xml + - name: Install dependencies for Codecov + run: > + apt-get install --no-install-recommends --yes + ca-certificates curl git + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + files: ./coverage.xml unittest: runs-on: ubuntu-latest