Skip to content

Restrict to 4 dimensions in Python interface #1500

Restrict to 4 dimensions in Python interface

Restrict to 4 dimensions in Python interface #1500

Workflow file for this run

name: Code Coverage
on:
push:
branches: [ main ]
paths: &python-paths
- "include/**"
- "**/CMakeLists.txt"
- "**/*.cmake"
- "cmake/**"
- "CLUEstering/**"
pull_request:
branches: [ main ]
paths: *python-paths
permissions:
contents: read
jobs:
codecov-coverage-reporter:
runs-on: ubuntu-latest
name: codecov-coverage-reporter
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 1
submodules: recursive
- name: Cache apt packages
uses: actions/cache@v6
with:
path: /var/cache/apt/archives
key: apt-${{ runner.os }}-lcov-boost-tbb
- name: Install apt packages
run: |
sudo apt-get update -y
sudo apt install -y lcov libboost-atomic-dev
- name: Cache pip packages
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-coverage-pytest-sklearn-pandas-matplotlib
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest scikit-learn pandas matplotlib coverage
- name: Compile C++ tests
working-directory: ${{github.workspace}}
run: |
cmake -B build -DBUILD_TESTING=ON -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel
- name: Measure coverage of C++ tests
working-directory: ${{github.workspace}}
run: |
ctest --test-dir build --output-on-failure --parallel $(nproc)
- name: Create coverage report
working-directory: ${{github.workspace}}/build
run: |
lcov --capture --directory .. --output-file coverage.info --ignore-errors mismatch
lcov --remove coverage.info '/usr/*' '*/extern/*' --output-file cpp-coverage.info --ignore-errors unused mismatch
cp cpp-coverage.info ${{github.workspace}}/cpp-coverage.info
- name: Build Python bindings
working-directory: ${{github.workspace}}
run: |
rm -rf build
cmake -B build -DBUILD_PYTHON=ON && cmake --build build --parallel
- name: Measure coverage of Python tests
working-directory: ${{github.workspace}}/tests
run: |
coverage run -m pytest
coverage xml -o python-coverage.xml
- uses: codecov/codecov-action@v7
if: github.event.repository.full_name == 'cms-patatrack/CLUEstering'
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: |
${{github.workspace}}/cpp-coverage.info
${{github.workspace}}/tests/python-coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
slug: cms-patatrack/CLUEstering