From 81bfe8bf628de9bf8f007c951519fa45c630ed96 Mon Sep 17 00:00:00 2001 From: Wisaroot Lertthaweedech <66859294+wislertt@users.noreply.github.com> Date: Mon, 1 Dec 2025 20:56:00 +0700 Subject: [PATCH] fix: fix condition for SonarQube and Codecov (#101) --- .github/workflows/ci-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 174736b..4491e6d 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -76,13 +76,13 @@ jobs: run: make test - name: SonarQube Scan - if: matrix.python-version == env.TARGET_PYTHON_VERSION && github.event.pull_request.head.repo.full_name == github.repository + if: matrix.python-version == env.TARGET_PYTHON_VERSION && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Upload coverage reports to Codecov - if: matrix.python-version == env.TARGET_PYTHON_VERSION && github.event.pull_request.head.repo.full_name == github.repository + if: matrix.python-version == env.TARGET_PYTHON_VERSION && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 with: fail_ci_if_error: true