Skip to content

Commit b66c9b1

Browse files
author
Jakub Jirous
committed
workflow for sonar cloud
workflow for sonar cloud
1 parent 5fb852a commit b66c9b1

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/testing.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit Tests
1+
name: Testing
22

33
on:
44
push:
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
tests:
11+
name: Unit Tests
1112
runs-on: ubuntu-latest
1213

1314
strategy:
@@ -23,3 +24,16 @@ jobs:
2324
- run: npm install -g yarn
2425
- run: yarn
2526
- run: yarn test
27+
28+
sonarcloud:
29+
name: SonarCloud
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
35+
- name: SonarCloud Scan
36+
uses: SonarSource/sonarcloud-github-action@master
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
39+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonar.projectKey=jakubjirous_code-signal
2+
sonar.organization=jakubjirous
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
#sonar.projectName=code-signal
6+
#sonar.projectVersion=1.0
7+
8+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
9+
#sonar.sources=.
10+
11+
# Encoding of the source code. Default is default system encoding
12+
#sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)