This commit is contained in:
Executable
+50
@@ -0,0 +1,50 @@
|
|||||||
|
name: SonarQube Analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sonarqube:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install backend deps
|
||||||
|
run: npm install
|
||||||
|
working-directory: backend
|
||||||
|
|
||||||
|
- name: Install frontend deps
|
||||||
|
run: npm install
|
||||||
|
working-directory: frontend
|
||||||
|
|
||||||
|
- name: TypeScript build check (backend)
|
||||||
|
run: npm run build
|
||||||
|
working-directory: backend
|
||||||
|
|
||||||
|
- name: TypeScript build check (frontend)
|
||||||
|
run: npm run build
|
||||||
|
working-directory: frontend
|
||||||
|
|
||||||
|
- name: SonarQube Scan
|
||||||
|
uses: sonarsource/sonarqube-scan-action@v4
|
||||||
|
env:
|
||||||
|
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: >
|
||||||
|
-Dsonar.projectKey=redefined-designs
|
||||||
|
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
||||||
|
-Dsonar.sources=backend/src,frontend/src
|
||||||
|
-Dsonar.exclusions=**/node_modules/**,**/dist/**
|
||||||
Reference in New Issue
Block a user