88 - " packages/ats/**"
99 - " apps/ats/**"
1010 - " package.json"
11+ - " codecov.yml"
1112 - " .github/workflows/*ats*.yaml"
1213 workflow_dispatch :
1314
@@ -17,6 +18,7 @@ defaults:
1718
1819permissions :
1920 contents : read
21+ statuses : read # gate step reads the codecov/project commit status
2022
2123jobs :
2224 test-ats :
@@ -99,3 +101,50 @@ jobs:
99101 - name : Upload coverage report
100102 if : ${{ steps.generate_coverage.outcome == 'success' }}
101103 uses : codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v5.4.0
104+
105+ # TEMPORARY DIAGNOSTIC (non-blocking).
106+ # The prior enforcement step only read commit *statuses* and never found
107+ # `codecov/project` (state='<none>' for 5 min), producing a false failure.
108+ # Codecov may instead report via the *check-runs* API, post under a
109+ # different SHA, or not post at all. This step dumps BOTH commit statuses
110+ # and check-runs for the PR head SHA each poll so the next run shows
111+ # exactly what Codecov posts and where. It NEVER fails the job — re-enable
112+ # enforcement once we know the reporting mechanism.
113+ - name : Diagnose Codecov status/check-run posting
114+ if : ${{ github.event_name == 'pull_request' && steps.generate_coverage.outcome == 'success' }}
115+ env :
116+ GH_TOKEN : ${{ github.token }}
117+ HEAD_SHA : ${{ github.event.pull_request.head.sha }}
118+ REPO : ${{ github.repository }}
119+ run : |
120+ echo "Inspecting Codecov reporting for head SHA ${HEAD_SHA} in ${REPO}"
121+ for attempt in $(seq 1 30); do
122+ echo "----- attempt ${attempt}/30 -----"
123+
124+ echo "[commit statuses]"
125+ gh api "repos/${REPO}/commits/${HEAD_SHA}/statuses" \
126+ --jq '.[] | " status: \(.context) = \(.state)"' \
127+ || echo " (statuses query failed)"
128+
129+ echo "[check runs]"
130+ gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs" \
131+ --jq '.check_runs[] | " check : \(.name) = status:\(.status) conclusion:\(.conclusion // "n/a")"' \
132+ || echo " (check-runs query failed)"
133+
134+ # Stop early once anything Codecov-related has posted in either place.
135+ found=$(
136+ {
137+ gh api "repos/${REPO}/commits/${HEAD_SHA}/statuses" --jq '.[].context' 2>/dev/null
138+ gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs" --jq '.check_runs[].name' 2>/dev/null
139+ } | grep -i codecov || true
140+ )
141+ if [ -n "${found}" ]; then
142+ echo "✓ Found Codecov entries (note whether they are statuses or checks above):"
143+ echo "${found}" | sed 's/^/ /'
144+ break
145+ fi
146+
147+ echo " no codecov entry yet — waiting 10s"
148+ sleep 10
149+ done
150+ echo "Diagnostic complete (non-blocking; job will not fail here)."
0 commit comments