chore: enable test coverage for sonar

This commit is contained in:
mathuo 2021-03-28 20:39:01 +01:00
parent ad9fd519ec
commit 0c6318c655
4 changed files with 12 additions and 22 deletions

View File

@ -12,7 +12,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: "12.x"
- uses: actions/cache@v2
with:
@ -29,3 +29,11 @@ jobs:
env:
CI: true
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- 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 }}

View File

@ -1,20 +0,0 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- 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 }}

View File

@ -20,5 +20,5 @@ module.exports = {
modulePathIgnorePatterns: [
'<rootDir>/packages/dockview/src/__tests__/__mocks__',
],
coverageDirectory: 'coverage',
coverageDirectory: '<rootDir>/packages/dockview/coverage/',
};

View File

@ -12,3 +12,5 @@ sonar.inclusions=packages/dockview/**/*
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
sonar.javascript.lcov.reportPaths=packages/dockview/coverage/lcov.info