Skip to content

Bump codecov/codecov-action from 5.0.4 to 5.0.7 #2028

Bump codecov/codecov-action from 5.0.4 to 5.0.7

Bump codecov/codecov-action from 5.0.4 to 5.0.7 #2028

Workflow file for this run

name: CodeCoverage
on:
push:
paths:
# Workflow file itself
- '.github/workflows/CodeCoverage.yml'
# C++ files
- '**.cpp'
- '**.hpp'
# CMake files
- '**.cmake'
- '**.txt'
# Script files
- '**.sh'
pull_request:
branches:
- main
- develop
paths:
# Workflow file itself
- '.github/workflows/CodeCoverage.yml'
# C++ files
- '**.cpp'
- '**.hpp'
# CMake files
- '**.cmake'
- '**.txt'
# Script files
- '**.sh'
release:
types: [published]
workflow_dispatch:
jobs:
linux:
runs-on: 'ubuntu-24.04'
# Don't run on dependabot PRs
if: github.actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
compiler:
- "gcc-14"
build_type:
- "Debug"
- "Release"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Environment
run: scripts/ci/SetupEnvironment.sh
- name: Install compiler
run: scripts/ci/InstallTools.sh ${{ matrix.compiler }} ninja gcovr
- name: Configure build directory
run: |
mkdir build -p
cd build
cmake -DCMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} -DPHI_COVERAGE_BUILD:BOOL=ON -DPHI_TEST_COMPILE_FAILURES:BOOL=OFF ..
- name: Build
working-directory: ./build
run: cmake --build . --config ${{ matrix.build_type }}
- name: Run tests
working-directory: ./build
run: ctest . -C ${{ matrix.build_type }}
- name: Process coverage data
working-directory: ./build
run: gcovr -j ${PROC_COUNT} --delete --root ../ --print-summary --exclude-unreachable-branches --exclude-function-lines --xml-pretty --xml coverage.xml . --gcov-executable "${GCOV_EXECUTABLE}" --exclude-lines-by-pattern "^\s*{$" --exclude-lines-by-pattern "^\s*}$"
- name: Upload coverage data
uses: codecov/codecov-action@v5.0.7
with:
file: ./build/coverage.xml
flags: ${{ runner.os }},${{ matrix.compiler }},${{ matrix.build_type }}
name: ${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
plugin: noop