From be8e52357490538342126a5efe2ec57154c709b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joe=20K=C3=BCng?= Date: Tue, 3 Mar 2026 12:33:18 +0100 Subject: [PATCH] fix(deploy): cicd.yaml --- .gitea/workflows/cicd.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index c2b1f54..8975867 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -3,6 +3,8 @@ name: Build, Test, Deploy and Analysis on: push: branches: [main, int, dev] + pull_request: + branches: [main, int, dev] workflow_dispatch: concurrency: @@ -12,6 +14,7 @@ concurrency: jobs: # --- JOB DI ANALISI (In parallelo) --- qodana: + if: ${{ gitea.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - name: Checkout @@ -19,11 +22,19 @@ jobs: with: fetch-depth: 0 # Fondamentale per Qodana per analizzare la storia + - name: Prepare Qodana directories + shell: bash + run: | + mkdir -p .qodana/caches .qodana/results + - name: 'Qodana Scan' uses: JetBrains/qodana-action@v2025.3 env: QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} with: + cache-dir: .qodana/caches + results-dir: .qodana/results + args: -i,backend # In Gitea, pr-mode funziona se il runner ha accesso ai dati del clone pr-mode: ${{ gitea.event_name == 'pull_request' }} use-caches: false @@ -32,6 +43,7 @@ jobs: post-pr-comment: false use-annotations: true test-backend: + if: ${{ gitea.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - name: Checkout @@ -50,7 +62,7 @@ jobs: ./gradlew test build-and-push: - needs: test-backend + if: ${{ gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest steps: - name: Checkout @@ -101,6 +113,7 @@ jobs: deploy: needs: build-and-push + if: ${{ gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest steps: - name: Checkout