Skip to content

Commit 8ad6736

Browse files
authored
fix: sonar codecoverage
1 parent 4408728 commit 8ad6736

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

.github/workflows/build.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
workflow_dispatch:
9+
10+
jobs:
11+
sonarcloud:
12+
name: SonarCloud
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
18+
19+
- name: Setup node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22.4.x
23+
24+
- name: Configure prod AWS credentials
25+
uses: aws-actions/configure-aws-credentials@v4.0.1
26+
with:
27+
aws-access-key-id: ${{ secrets.AWS_SECRET_KEY_ID}}
28+
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY}}
29+
aws-region: ${{ secrets.AWS_REGION }}
30+
- run: ./scripts/init-npm.sh harena-store npm-hei-school 088312068315 eu-west-3
31+
32+
- name: SonarCloud Scan
33+
uses: SonarSource/sonarcloud-github-action@master
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.nycrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"lines": 80,
77
"report-dir": "coverage",
88
"reporter": ["json", "lcov", "html"],
9-
"extension": [".jsx", ".tsx", "ts", "js"],
9+
"extension": [".jsx", ".tsx"],
1010
"include": ["src"],
1111
"exclude": ["node_modules"]
1212
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"husky": "^9.1.1",
4646
"lint-staged": "^15.2.7",
4747
"prettier": "^3.3.3",
48+
"sonarqube-scanner": "^4.0.1",
4849
"typescript": "^5.2.2",
4950
"vite": "^5.3.4",
5051
"vite-plugin-istanbul": "^6.0.2",

sonar-project.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
sonar.organization=harena-sonic
1+
sonar.host.url=https://sonarcloud.io
22
sonar.projectKey=HARENA-SONIC_harena-web
3+
sonar.organization=harena-sonic
34
sonar.language=ts
45
sonar.sources=src
56
sonar.exclusions=src/assets/catpuccin-palletes.ts

0 commit comments

Comments
 (0)