Skip to content

Commit

Permalink
Generate coverage for sonar, cache npm
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Sep 26, 2022
1 parent ee67529 commit 2213041
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis (SonarCloud)
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Build & test
run: |
npm ci
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ jobs:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis (SonarCloud)
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: npm
- name: Generate coverage
run: |
npm ci
npm run build
xvfb-run --auto-servernum npm test
shell: bash
- name: SonarCloud Scan
if: github.event.repository.fork == false
uses: SonarSource/sonarcloud-github-action@master
Expand Down

0 comments on commit 2213041

Please sign in to comment.