Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Test
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [ "main" ]

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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