From 6d5f3e59752abc835fad776e664153f389519864 Mon Sep 17 00:00:00 2001 From: mathuo <6710312+mathuo@users.noreply.github.com> Date: Mon, 13 Mar 2023 19:24:00 +0300 Subject: [PATCH] chore: fix sonar line coverage --- .github/workflows/main.yml | 11 +------ .github/workflows/test.yml | 32 ------------------- .../dockview-core/sonar-project.properties | 27 ---------------- packages/dockview/sonar-project.properties | 27 ---------------- packages/dockview/tsconfig.json | 6 ++-- sonar-project.properties | 3 -- 6 files changed, 4 insertions(+), 102 deletions(-) delete mode 100644 .github/workflows/test.yml delete mode 100644 packages/dockview-core/sonar-project.properties delete mode 100644 packages/dockview/sonar-project.properties diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9e970df3..ebf84ee07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,17 +27,8 @@ jobs: - run: npm run bootstrap - run: npm run build - run: npm run test:cov - - name: SonarCloud Scan 1 + - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: packages/dockview-core/ - - name: SonarCloud Scan 2 - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: packages/dockview/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 00f0bc0b9..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: My Test Monorepo Project -on: [push] -jobs: - sonarcloudScan1: - name: SonarCloudScan1 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: packages/dockview-core/ - - sonarcloudScan2: - name: SonarCloudScan2 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: packages/dockview/ diff --git a/packages/dockview-core/sonar-project.properties b/packages/dockview-core/sonar-project.properties deleted file mode 100644 index f413f6c50..000000000 --- a/packages/dockview-core/sonar-project.properties +++ /dev/null @@ -1,27 +0,0 @@ -sonar.projectKey=mathuo_dockview -sonar.organization=dockview - -# Define the same root directory for sources and tests -sonar.sources = src/ -sonar.tests = src/ - -# Include test subdirectories in test scope -sonar.test.inclusions = src/__tests__/**/* - -# Exclude test subdirectories from source scope -sonar.exclusions = src/__tests__/**/* - -# sonar.testExecutionReportPaths=test-report.xml -# sonar.javascript.lcov.reportPaths=coverage/lcov.info - -# This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=dockview -#sonar.projectVersion=1.0 - -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -# sonar.sources=packages - -# Encoding of the source code. Default is default system encoding -sonar.sourceEncoding=UTF-8 - - diff --git a/packages/dockview/sonar-project.properties b/packages/dockview/sonar-project.properties deleted file mode 100644 index f413f6c50..000000000 --- a/packages/dockview/sonar-project.properties +++ /dev/null @@ -1,27 +0,0 @@ -sonar.projectKey=mathuo_dockview -sonar.organization=dockview - -# Define the same root directory for sources and tests -sonar.sources = src/ -sonar.tests = src/ - -# Include test subdirectories in test scope -sonar.test.inclusions = src/__tests__/**/* - -# Exclude test subdirectories from source scope -sonar.exclusions = src/__tests__/**/* - -# sonar.testExecutionReportPaths=test-report.xml -# sonar.javascript.lcov.reportPaths=coverage/lcov.info - -# This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=dockview -#sonar.projectVersion=1.0 - -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -# sonar.sources=packages - -# Encoding of the source code. Default is default system encoding -sonar.sourceEncoding=UTF-8 - - diff --git a/packages/dockview/tsconfig.json b/packages/dockview/tsconfig.json index 9e9f62ec0..932770600 100644 --- a/packages/dockview/tsconfig.json +++ b/packages/dockview/tsconfig.json @@ -6,9 +6,9 @@ "jsx": "react", "rootDir": "src" }, - "references": [ - { "dockview-core": "../dockview-core" } - ], + "paths": { + "dockview-core": "../dockview-core" + }, "include": ["src"], "exclude": ["**/node_modules", "src/__tests__"] } diff --git a/sonar-project.properties b/sonar-project.properties index 7da879a26..a6f0eea51 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -17,6 +17,3 @@ sonar.sources=packages # Encoding of the source code. Default is default system encoding sonar.sourceEncoding=UTF-8 - -sonar.verbose=true -