mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 14:18:58 +08:00
feat: add Sonar analysis to build pipeline (#324)
This commit is contained in:
parent
050da9a2a9
commit
6f4327bfa1
5
.github/workflows/README.md
vendored
5
.github/workflows/README.md
vendored
@ -23,3 +23,8 @@ To run GitHub workflow, a few environment variables needs to add in GitHub secre
|
|||||||
<td> Docker hub password/token with push permission </td>
|
<td> Docker hub password/token with push permission </td>
|
||||||
<td> **** </td>
|
<td> **** </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> SONAR_TOKEN </td>
|
||||||
|
<td> <a href="https://sonarcloud.io">SonarCloud</a> token </td>
|
||||||
|
<td> **** </td>
|
||||||
|
</tr>
|
||||||
|
27
.github/workflows/sonar.yml
vendored
Normal file
27
.github/workflows/sonar.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: sonar
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- v*
|
||||||
|
paths:
|
||||||
|
- 'frontend/**'
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: frontend
|
||||||
|
jobs:
|
||||||
|
sonar-analysis:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Sonar analysis
|
||||||
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
|
with:
|
||||||
|
projectBaseDir: frontend
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
6
frontend/sonar-project.properties
Normal file
6
frontend/sonar-project.properties
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
sonar.organization=szatyinadam
|
||||||
|
sonar.projectKey=szatyinadam_signoz
|
||||||
|
|
||||||
|
# relative paths to source directories. More details and properties are described
|
||||||
|
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
|
||||||
|
sonar.sources=./src
|
Loading…
x
Reference in New Issue
Block a user