Skip to content

Commit

Permalink
ci: extract Sonar scan to a seprate job
Browse files Browse the repository at this point in the history
This will prevent GitHub Actions from downloading Sonar scanner image too early
  • Loading branch information
gavvvr committed Oct 21, 2024
1 parent 6a891b8 commit b099818
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: '22'
Expand All @@ -35,6 +35,23 @@ jobs:
if: always()
with:
files: 'test-results.xml'
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: lcov.info
path: coverage/lcov.info
SonarScan:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Download coverage data
uses: actions/download-artifact@v4
with:
name: lcov.info
path: coverage/
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down

0 comments on commit b099818

Please sign in to comment.