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