From 456721d765f85deaac15ef8d10b213e7805a38b4 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Tue, 24 Mar 2026 19:10:08 +0800 Subject: [PATCH] ci(codecov): upload only on main pushes --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68fdb99..6ad5b3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,7 @@ jobs: CI: true - name: Normalize coverage paths for Codecov + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} run: | python - <<'PY' from pathlib import Path @@ -108,9 +109,11 @@ jobs: PY - name: Show normalized coverage file entries + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} run: grep '^SF:' coverage/lcov.info | head - name: Upload coverage to Codecov + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} uses: codecov/codecov-action@v5 with: files: ./coverage/lcov.info