mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-09-04 01:03:27 +00:00
fix: ci fix + code measurement reported (#5)
* patch: code coverage * fix: ci fix
This commit is contained in:
@@ -27,17 +27,32 @@ jobs:
|
||||
sudo apt-get install -y
|
||||
cmake
|
||||
ninja-build
|
||||
gcovr
|
||||
pkg-config
|
||||
libgtk-3-dev
|
||||
libwxgtk3.2-dev
|
||||
|
||||
- name: Generate compile commands
|
||||
- name: Configure with coverage instrumentation
|
||||
run: >
|
||||
cmake -S . -B build -G Ninja
|
||||
-DCCM_BUILD_TESTS=OFF
|
||||
-DCCM_BUILD_TESTS=ON
|
||||
-DCCM_USE_SYSTEM_WX=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DCMAKE_C_FLAGS=--coverage
|
||||
-DCMAKE_CXX_FLAGS=--coverage
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
|
||||
- name: Build and run tests for coverage
|
||||
run: >
|
||||
cmake --build build --parallel &&
|
||||
ctest --test-dir build --output-on-failure
|
||||
|
||||
- name: Generate Sonar coverage report
|
||||
run: >
|
||||
gcovr -r .
|
||||
--sonarqube build/sonarqube-coverage.xml
|
||||
--exclude "build/_deps/"
|
||||
|
||||
- name: SonarQube Cloud scan
|
||||
uses: SonarSource/sonarqube-scan-action@v5
|
||||
env:
|
||||
@@ -50,6 +65,7 @@ jobs:
|
||||
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
|
||||
-Dsonar.sources=core,ui_wx,app
|
||||
-Dsonar.cfamily.compile-commands=build/compile_commands.json
|
||||
-Dsonar.coverageReportPaths=build/sonarqube-coverage.xml
|
||||
|
||||
linux:
|
||||
name: Linux build + tests
|
||||
|
||||
Reference in New Issue
Block a user