Skip to content

Commit

Permalink
updates code coverage action
Browse files Browse the repository at this point in the history
  • Loading branch information
LumaC0 committed Oct 25, 2023
1 parent 1a94706 commit 40c8958
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ jobs:
name: Upload Coverage to Sonarqube
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout alks cli
run: git clone https://github.com/Cox-Automotive/alks-cli.git
- name: Setup node
uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm run coverage
node-version: 20
- name: Install node modules
run: npm ci
- name: Build coverage report
run: npm run coverage
env:
CI: true
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-X
8 changes: 6 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ sonar.javascript.lcov.reportPaths=./coverage/lcov.info
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Defaults to .
#sonar.sources=.
sonar.sources=src/lib
sonar.exclusions=src/lib/**/*.test.ts

# sonar.tests=src/lib
sonar.tests.inclusions=src/lib/**/*.test.ts

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
#sonar.sourceEncoding=UTF-8

0 comments on commit 40c8958

Please sign in to comment.