From 2adbf24b2332e5c085344079fccff214d6609efd Mon Sep 17 00:00:00 2001 From: Thom Lamb Date: Thu, 13 Aug 2026 21:53:31 +0000 Subject: [PATCH] Add SonarQube CI workflow --- .gitea/workflows/sonarqube.yml | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 .gitea/workflows/sonarqube.yml diff --git a/.gitea/workflows/sonarqube.yml b/.gitea/workflows/sonarqube.yml new file mode 100755 index 0000000..d56c013 --- /dev/null +++ b/.gitea/workflows/sonarqube.yml @@ -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/**