Skip to content

Commit dec0a5d

Browse files
authored
chore(Sonar): implement sonar (#30)
1 parent ed93f31 commit dec0a5d

6 files changed

Lines changed: 300 additions & 868 deletions

File tree

.github/workflows/sonar.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
push:
3+
branches:
4+
- '**'
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
name: Test and build
9+
jobs:
10+
sonarqube:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- name: Build and test
20+
run: |
21+
npm ci
22+
npm run build
23+
npm run lint
24+
npm run test:unit -- --coverage
25+
- uses: sonarsource/sonarqube-scan-action@master
26+
env:
27+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
28+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

0 commit comments

Comments
 (0)