From 6e7461bafd7b60bb68748e0def79f0df1fa45f24 Mon Sep 17 00:00:00 2001 From: Daniel Thaler Date: Wed, 23 Aug 2023 16:04:22 +0200 Subject: [PATCH] collect code coverage information for the test suite --- .github/workflows/Test.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 8ce2925..245d410 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -27,10 +27,22 @@ jobs: python -m pip install --upgrade pip pip install pytest pip install maturin + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov - name: Build and install wheel run: | + source <(cargo llvm-cov show-env --export-prefix) maturin build --out dist --find-interpreter pip install autosar-data --find-links dist - name: Test with pytest run: | - pytest \ No newline at end of file + pytest + - name: Collect test coverage data + run: | + cargo llvm-cov report --lcov --output-path lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: lcov.info