@@ -15,22 +15,12 @@ jobs:
1515 steps :
1616 - name : Checkout repository
1717 uses : actions/checkout@v4
18-
19- # - name: Set up clang-format
20- # run: sudo apt update && sudo apt install -y clang-format
21-
22- - name : Check code formatting
23- run : |
24- set -e
25- CHANGED_FILES=$(find src tests -name '*.cpp' -o -name '*.h')
26- FORMAT_ERRORS=0
27- for file in $CHANGED_FILES; do
28- clang-format --dry-run --Werror "$file" || FORMAT_ERRORS=1
29- done
30- if [ "$FORMAT_ERRORS" -ne 0 ]; then
31- echo "Code is not properly formatted. Please run clang-format."
32- exit 1
33- fi
18+
19+ - name : clang-format
20+ run : hooks/check_clang_format.sh
21+
22+ - name : clang-tidy
23+ run : hooks/check_clang_tidy.sh
3424
3525 build_and_test :
3626 needs : format
4939 restore-keys : |
5040 ${{ runner.os }}-conan-
5141
52- # - name: Install system dependencies
53- # run: |
54- # set -e
55- # sudo apt update && sudo apt install -y g++ lcov
56- # pip install conan
57-
5842 - name : Install conan dependencies
5943 run : |
6044 set -e
@@ -74,21 +58,13 @@ jobs:
7458 --output-file lcov.info \
7559 --rc geninfo_unexecuted_blocks=1 \
7660 --ignore-errors mismatch
77- # lcov --remove lcov.info '/home/*' '/usr/*' 'tests/*' --output-file lcov_filtered.info
78- # TODO: need to solve mismatch before proceeding, custom docker image
79-
80- # TODO: should coverage be published in the case that SonarQube fails?
81- # - name: Upload coverage to Coveralls
82- # uses: coverallsapp/github-action@v2
83- # with:
84- # path-to-lcov: lcov.info
85- # continue-on-error: true
61+ lcov --remove lcov.info '/home/*' '/usr/*' 'tests/*' --output-file lcov_filtered.info
8662
8763 - name : Upload coverage to Codecov
8864 uses : codecov/codecov-action@v5
8965 with :
9066 token : ${{ secrets.CODECOV_TOKEN }}
91- files : lcov .info
67+ files : lcov_filtered .info
9268 continue-on-error : true
9369
9470 - name : SonarQube Scan
0 commit comments