Skip to content

pre-commit

pre-commit #350

Workflow file for this run

name: pre-commit
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Run pre-commit
run : |
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
echo "::group::Setup pre-commit"
python -m venv pre-commit-venv
source pre-commit-venv/bin/activate
pip install pre-commit pylint==2.17.7 flake8
echo "::endgroup::"
echo "::group::Run CMake"
cmake -S . -B build -DENABLE-SIO=ON \
-DENABLE_JULIA=ON \
-DENABLE_RNTUPLE=ON \
-DENABLE_DATASOURCE=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror "\
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DUSE_EXTERNAL_CATCH2=OFF
ln -s build/compile_commands.json compile_commands.json
echo "::group::Run pre-commit"
pre-commit run --show-diff-on-failure \
--color=always \
--all-files
echo "::endgroup::"