Skip to content

Add a .clang-tidy file #563

Add a .clang-tidy file

Add a .clang-tidy file #563

Workflow file for this run

# Copyright (c) 2020-2023 Morwenn
# SPDX-License-Identifier: MIT
name: Coverage Upload to Codecov
on:
push:
branches:
- 1.x.y-develop
- 1.x.y-stable
- 2.x.y-develop
paths:
- '.github/workflows/code-coverage.yml'
- '.github/.codecov.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'include/**'
- 'tests/**'
jobs:
upload-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Install LCOV
run: sudo apt-get install -y lcov
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}
run: >
cmake -H${{github.event.repository.name}} -Bbuild
-DCMAKE_BUILD_TYPE=Debug
-DCPPSORT_ENABLE_COVERAGE=ON
-G"Unix Makefiles"
- name: Build with coverage
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Debug -j 2
- name: Run the test suite
shell: bash
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
run: ctest -C Debug --no-tests=error
- name: Capture coverage info
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target lcov-capture
- name: Upload coverage info
uses: codecov/codecov-action@v3
with:
directory: ${{runner.workspace}}/build/lcov/data
files: '*.info'
fail_ci_if_error: true