Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/frontend-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
secrets:
codecov_token:
required: true
required: false

jobs:
frontend:
Expand Down Expand Up @@ -32,5 +32,5 @@ jobs:
with:
verbose: true
token: ${{ secrets.codecov_token }}
fail_ci_if_error: true
fail_ci_if_error: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Codecov is now non-blocking for internal runs too.

Line 35 disables CI failure on Codecov upload errors for all runs of this reusable workflow, not just fork PRs. That changes internal PR/main push behavior instead of keeping it unchanged.

Suggested scoped fix (fork PRs non-blocking, internal stays blocking)
diff --git a/.github/workflows/frontend-unit-tests.yml b/.github/workflows/frontend-unit-tests.yml
@@
 on:
   workflow_call:
+    inputs:
+      codecov_fail_ci_if_error:
+        required: false
+        type: boolean
+        default: true
     secrets:
       codecov_token:
         required: false
@@
       - name: Upload coverage reports to Codecov
         uses: codecov/codecov-action@v5.5.2
         with:
           verbose: true
           token: ${{ secrets.codecov_token }}
-          fail_ci_if_error: false
+          fail_ci_if_error: ${{ inputs.codecov_fail_ci_if_error }}
           directory: frontend/coverage
diff --git a/.github/workflows/unit-tests-pr.yml b/.github/workflows/unit-tests-pr.yml
@@
   frontend-unit-tests:
     if: (github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]')
     name: Unit Tests
     uses: ./.github/workflows/frontend-unit-tests.yml
+    with:
+      codecov_fail_ci_if_error: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
     secrets:
       codecov_token: ${{ secrets.CODECOV_TOKEN }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/frontend-unit-tests.yml at line 35, Replace the
unconditional setting fail_ci_if_error: false with a conditional expression that
only disables Codecov failures for forked PRs; e.g. set fail_ci_if_error to an
expression like ${{ github.event.pull_request &&
github.event.pull_request.head.repo.full_name != github.repository }} so the
unique flag fail_ci_if_error is false only for fork PRs and remains blocking for
internal runs (keep the rest of the workflow unchanged).

directory: frontend/coverage
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- run: pip install pytest-cov pytest-xdist
- run: pytest tests/unit --cov=backend --cov-report=xml --cov-branch -n auto
- name: SonarCloud Scan
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
uses: sonarsource/sonarqube-scan-action@v7.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Loading