Skip to content

Commit

Permalink
ci(sonar): support code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Oct 23, 2023
1 parent e7f7f16 commit b038ae4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ jobs:
- name: Install dependencies (with dev)
run: npm ci --include=dev

- name: Run tests
run: npm run test
- name: Run test and coverage
run: npm run test -- --coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
with:
args: >
-Dsonar.organization=my-louisgrasset
-Dsonar.projectKey=my-louisgrasset_touitomamout
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
commitlint:
name: "Commitlint Validation"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down

0 comments on commit b038ae4

Please sign in to comment.