From 88d9f8c65ee2fba2da8c7d86260227d90b07ad86 Mon Sep 17 00:00:00 2001 From: Matt Howard Date: Mon, 5 Aug 2024 14:17:35 -0500 Subject: [PATCH] Add test coverage for Sonar Signed-off-by: Matt Howard --- .github/workflows/build.yml | 4 ++++ sonar-project.properties | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dc84eb703..22a0a3275f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,10 @@ jobs: - run: ./canvas_modules/common-canvas/build.sh - run: ./canvas_modules/harness/build.sh test - run: ./canvas_modules/harness/functional_test.sh + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + SONAR_TOKEN: ${{ secrets. SONAR_TOKEN }} tag: runs-on: ubuntu-latest diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000000..4f86c70dd6 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,8 @@ +sonar.projectKey=elyra-ai_canvas + +# relative paths to source directories. More details and properties are described +# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/ +sonar.sources=canvas_modules/common-canvas/src,canvas_modules/common-canvas/utils +sonar.tests=canvas_modules/common-canvas/__tests__ +sonar.javascript.lcov.reportPaths=canvas_modules/common-canvas/coverage/lcov.info +sonar.verbose=true \ No newline at end of file