From 765de1fd6dbf550581528bdfa30af71013d6c321 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Fri, 21 Feb 2025 18:53:04 +0900 Subject: [PATCH] Fixed coverage upload. --- .github/workflows/coverage.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 13029c62..38cf3263 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -63,12 +63,15 @@ jobs: cmake --build build --target all || exit 1 ctest --test-dir build || exit 1 - - name: Upload coverage to Codecov + - name: Generate coverage working-directory: build run: | # Create lcov report lcov --capture --directory . --output-file coverage.info --ignore-errors mismatch lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files lcov --list coverage.info # debug info - # Uploading report to CodeCov - bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: build/coverage.info + token: ${{ secrets.CODECOV_TOKEN }}