generated from nhcarrigan/template
feat(tools): set up sonar #1
@ -30,22 +30,3 @@ jobs:
|
||||
|
||||
- name: Run Tests
|
||||
run: pnpm run test
|
||||
|
||||
- name: Echo
|
||||
run: |
|
||||
echo "PR Number: ${{ github.event.pull_request.number }}"
|
||||
echo "PR Branch: ${{ github.event.pull_request.head.ref }}"
|
||||
|
||||
- name: Sonar
|
||||
uses: SonarSource/sonarqube-scan-action@v4
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.sources=.
|
||||
-Dsonar.projectKey=typescript-config
|
||||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
|
||||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
|
||||
-Dsonar.pullrequest.base=main
|
||||
|
24
.gitea/workflows/sonar-main.yml
Normal file
24
.gitea/workflows/sonar-main.yml
Normal file
@ -0,0 +1,24 @@
|
||||
name: Code Analysis
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
name: SonarQube
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Files
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Sonar
|
||||
uses: SonarSource/sonarqube-scan-action@v4
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.sources=.
|
||||
-Dsonar.projectKey=typescript-config
|
29
.gitea/workflows/sonar-pr.yml
Normal file
29
.gitea/workflows/sonar-pr.yml
Normal file
@ -0,0 +1,29 @@
|
||||
name: Code Analysis
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
name: SonarQube
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Files
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Sonar
|
||||
uses: SonarSource/sonarqube-scan-action@v4
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
|
||||
PR_KEY: ${{ github.event.pull_request.number }}
|
||||
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.sources=.
|
||||
-Dsonar.projectKey=typescript-config
|
||||
-Dsonar.pullrequest.key=$PR_KEY
|
||||
-Dsonar.pullrequest.branch=$PR_BRANCH
|
||||
-Dsonar.pullrequest.base=main
|
Loading…
x
Reference in New Issue
Block a user