Add Flake8-pyproject to fix python annotation workflow #9364
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Annotate Cpp | |
on: [pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
annotate-cpp: | |
strategy: | |
matrix: | |
os: ['ubuntu-latest'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: -1 | |
- name: Install Ubuntu dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y clang-tidy | |
- name: Install dependencies from PyPI | |
run: | | |
python3 -m pip install "conan<2" pybind11 ecl | |
- name: Create compile commands for clib | |
run: | | |
mkdir cmake-build | |
cmake -S src/clib -B cmake-build -DBUILD_TESTS=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
cmake --build cmake-build | |
- name: find changed files | |
id: find_changed_files | |
run: echo "changed_files=$(git diff --name-only ${{github.sha}} ${{github.event.pull_request.base.sha}} | tr ' ' '\n' | xargs ls -d 2>/dev/null | grep -E '\.(hpp|cpp)$' | tr '\n' ' ')" >> "$GITHUB_OUTPUT" | |
- run: echo ::add-matcher::.github/clang-tidy-matcher.json | |
- name: run clang-tidy | |
run: clang-tidy -p cmake-build/ ${{steps.find_changed_files.outputs.changed_files}} | |
if: steps.find_changed_files.outputs.changed_files != '' |