From 8020d637d51f25a37771f779f654d7cbe6cb1e83 Mon Sep 17 00:00:00 2001 From: Khalil Date: Sat, 4 Jul 2026 10:39:57 +0000 Subject: [PATCH] Add scan and test jobs --- .gitea/workflows/deploy.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 7d452bb..3d9436e 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -8,8 +8,40 @@ on: - 'frontend-deployment.yaml' jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install dependencies and test API + working-directory: ./api + run: npm install && node -c server.js + - name: Install dependencies and test Frontend + working-directory: ./frontend + run: npm install + + scan: + runs-on: ubuntu-latest + needs: test + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + continue-on-error: true + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + build-push-deploy: runs-on: ubuntu-latest + needs: scan steps: - name: Checkout Code uses: actions/checkout@v4