diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23263e6..070850c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ name: Test on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] push: branches: [ "main" ] @@ -41,6 +42,9 @@ jobs: compiler: clang++-17 - os: ubuntu-24.04 compiler: clang++-18 + - os: ubuntu-24.04 + compiler: clang++-19 + install: clang-19 # GCC on macOS - os: macos-15 compiler: g++-13 @@ -89,15 +93,18 @@ jobs: # but do run twice as many compilation tests as the number of # available threads - - name: Codecov + - name: Generate coverage reports if: contains(matrix.extra_build_flags, 'coverage') working-directory: ${{github.workspace}}/build run: | - echo "Producing coverage reports..." - find . -name catch_tests.cpp.gcno -exec gcov -pb {} + - - echo "Finding relevant report..." - cov_report=$(find . -name "*scope_guard.hpp.gcov" -exec readlink -e {} +) - - echo "The report is ${cov_report}. Uploading to codecov..." - bash <(curl -s https://codecov.io/bash) -f $cov_report + # Process test files from project root, excluding dependencies + find . -maxdepth 2 -name "*tests.cpp.gcno" -exec gcov -pb {} + + + - name: Codecov + if: contains(matrix.extra_build_flags, 'coverage') + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + directory: ${{github.workspace}}/build + files: . /**/*scope_guard.hpp.gcov + flags: unittests