From 712f4c89afe6c36722e57b10c4af4d595437b781 Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Wed, 21 Feb 2024 18:23:01 +0100 Subject: [PATCH] first try to add coverage reporting --- .github/workflows/unit-tests.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4e005cfb..03099cd9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -22,10 +22,20 @@ jobs: - name: Pull code uses: actions/checkout@v4 - name: Install dependencies - run: conda install -y -c conda-forge python=3 cupy cuda-version=11.8 + run: | + conda install -y -c conda-forge python=3 cupy cuda-version=11.8 + python -m pip install coverage - name: Install code and list dependencies run: | python -m pip install .[plotting] conda list - - name: Run tests - run: cd tests && python -m unittest discover + - name: Run tests and generate coverage + run: | + cd tests + coverage run -m unittest discover + coverage xml coverage.xml + - name: Get Coverage + uses: orgoro/coverage@v3.1 + with: + coverageFile: coverage.xml + token: ${{ secrets.GITHUB_TOKEN }}