Skip to content

Commit

Permalink
#4 Add code coverage
Browse files Browse the repository at this point in the history
* Upload to SonarCloud after code coverage
  • Loading branch information
tzijnge committed Nov 2, 2024
1 parent 3b8fd46 commit 6494b40
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ jobs:
run: |
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build ${{github.workspace}}/cmake_build --config ${{env.BUILD_TYPE}}
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
- name: C++ tests
working-directory: ${{github.workspace}}/cmake_build
run: ctest -C ${{env.BUILD_TYPE}} --output-junit ../testresults/cpptestresults.xml
Expand All @@ -77,3 +70,10 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action/linux@v2
with:
junit_files: "testresults/*.xml"

- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"

0 comments on commit 6494b40

Please sign in to comment.