Skip to content

Commit

Permalink
Add SonarCloud integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorian Eikenberg committed Mar 28, 2023
1 parent 3cc75e4 commit dbd9a46
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 339 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/codacy-clang-tidy-upload.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/codacy-coverage-upload.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/cpp-lint-thorough.yml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/cpp-lint.yml

This file was deleted.

94 changes: 4 additions & 90 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,9 @@ on:
push:
branches:
- "main"
paths:
- '**.h'
- '**.cpp'
- '**/CMakeLists.txt'
- '**/CMakePresets.json'
- '**/.clang-tidy'
- '**/.clang-format'
pull_request:
branches:
- "main"
paths:
- '**.h'
- '**.cpp'
- '**/CMakeLists.txt'
- '**/CMakePresets.json'
- '**/.clang-tidy'
- '**/.clang-format'

jobs:
format:
Expand All @@ -35,29 +21,6 @@ jobs:
- name: Perform C++ format check
run: find . -iname *.h -o -iname *.cpp | xargs clang-format --style=file --dry-run --Werror

test_core:
runs-on: ubuntu-latest
container:
image: ghcr.io/gdatasoftwareag/vmi-build

steps:
- uses: actions/checkout@v3

- name: Test vmicore
run: |
cmake --preset gcc-debug -D VMICORE_TEST_COVERAGE:BOOL=ON
cmake --build --preset gcc-build-debug --target vmicore-test
ctest --preset gcc-test
cd build-gcc-debug
gcovr -r ${GITHUB_WORKSPACE} --json coverage.json
working-directory: vmicore

- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage_vmicore
path: vmicore/build-gcc-debug/coverage.json

build_core:
runs-on: ubuntu-latest
container:
Expand All @@ -66,35 +29,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Build vmicore
- name: Build and test vmicore
run: |
cmake --preset clang-debug
cmake --build --preset clang-build-debug
ctest --preset clang-test
working-directory: vmicore

test_inmemoryscanner:
runs-on: ubuntu-latest
container:
image: ghcr.io/gdatasoftwareag/vmi-build

steps:
- uses: actions/checkout@v3

- name: Test inmemoryscanner
run: |
cmake --preset gcc-debug -D INMEMORYSCANNER_TEST_COVERAGE:BOOL=ON
cmake --build --preset gcc-build-debug --target inmemoryscanner-test
ctest --preset gcc-test
cd build-gcc-debug
gcovr -r ${GITHUB_WORKSPACE} --json coverage.json
working-directory: plugins/inmemoryscanner

- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage_inmemoryscanner
path: plugins/inmemoryscanner/build-gcc-debug/coverage.json

build_inmemoryscanner:
runs-on: ubuntu-latest
container:
Expand All @@ -103,36 +44,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Build inmemoryscanner
- name: Build and test inmemoryscanner
run: |
cmake --preset clang-debug
cmake --build --preset clang-build-debug
ctest --preset clang-test
working-directory: plugins/inmemoryscanner

consolidate_coverage_reports:
needs: [test_core, test_inmemoryscanner]
runs-on: ubuntu-latest
container:
image: ghcr.io/gdatasoftwareag/vmi-build

steps:
- name: Download vmicore coverage artifact
uses: actions/download-artifact@v3
with:
name: coverage_vmicore
path: vmicore

- name: Download inmemoryscanner coverage artifact
uses: actions/download-artifact@v3
with:
name: coverage_inmemoryscanner
path: plugins/inmemoryscanner

- name: Generate combined cobertura.xml
run: gcovr -a vmicore/coverage.json -a plugins/inmemoryscanner/coverage.json --xml cobertura.xml

- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage_all
path: cobertura.xml
Loading

0 comments on commit dbd9a46

Please sign in to comment.