Skip to content

Commit fe13f66

Browse files
authored
Update ci.yml
1 parent 4ca7241 commit fe13f66

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Codecov CI with Vitest and Bundle Analysis
1+
name: Codecov CI with Vitest and Bundle Analysis + SonarQube
22

33
on: [push, pull_request]
44

@@ -79,3 +79,21 @@ jobs:
7979
uses: codecov/test-results-action@v1
8080
with:
8181
token: ${{ secrets.CODECOV_ORG_TOKEN }}
82+
83+
- name: Install SonarQube scanner
84+
run: npm install -g sonarqube-scanner
85+
86+
- name: Create sonar-project.properties
87+
run: |
88+
cat <<EOF > sonar-project.properties
89+
sonar.projectKey=example-javascript
90+
sonar.sources=app
91+
sonar.javascript.lcov.reportPaths=coverage/lcov.info
92+
sonar.host.url=${{ secrets.SONAR_HOST_URL }}
93+
EOF
94+
95+
- name: Run SonarQube scanner
96+
run: sonar-scanner
97+
env:
98+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
99+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

0 commit comments

Comments
 (0)