Skip to content

Commit 3e6cf19

Browse files
committed
chore: refresh Codecov integration (action v5, yaml, app docs)
- Use codecov/codecov-action@v5 and explicit contents:read permission - Add codecov.yml for informational status and PR comment layout - Document Codecov GitHub App install in CI.md for reliable uploads/comments Made-with: Cursor
1 parent 0427809 commit 3e6cf19

4 files changed

Lines changed: 38 additions & 2 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
coverage:
1616
name: "Forge Coverage → Codecov"
1717
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
1820

1921
steps:
2022
- name: Checkout repository
@@ -47,7 +49,7 @@ jobs:
4749
|| echo "lcov --remove returned non-zero (ok if nothing to remove)"
4850
4951
- name: Upload coverage to Codecov
50-
uses: codecov/codecov-action@v4
52+
uses: codecov/codecov-action@v5
5153
with:
5254
files: lcov.info
5355
flags: foundry

CI.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,19 @@ codecov-action → codecov.io
102102
- **PR annotations** — Codecov comments on PRs showing coverage diff
103103
- **Dashboard** at https://codecov.io/gh/KaelSensei/solidity-dojo with per-file breakdown
104104

105+
### Codecov GitHub App (recommended)
106+
107+
Codecov shows warnings such as *“install the Codecov app … to ensure uploads and comments are reliably processed”* when the repo is not linked via the official integration.
108+
109+
1. Install the app for this org or repo: **[Codecov on GitHub Marketplace](https://github.com/marketplace/codecov)** (or **GitHub → Settings → Integrations → Applications → Codecov**).
110+
2. In **[codecov.io](https://codecov.io)** open this repository and confirm it is connected to **GitHub** (not “token only”).
111+
3. Re-run the **Coverage** workflow on a PR; uploads and PR comments should then be processed consistently.
112+
113+
Repository YAML: root **`codecov.yml`** configures non-blocking status checks and PR comment layout.
114+
105115
### Required secret
106116

107-
`CODECOV_TOKEN` must be set in **GitHub → Settings → Secrets → Actions**.
117+
`CODECOV_TOKEN` must be set in **GitHub → Settings → Secrets and variables → Actions** (still required for uploads from Actions unless you switch to [OIDC](https://docs.codecov.com/docs/github-oidc)).
108118

109119
The coverage report is non-blocking — a drop in coverage does not fail the CI.
110120

PROGRESS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ A hands-on Solidity training ground based on solidity-by-example.org.
88

99
- [x] **Naming / NatSpec cleanup (2026-04)**: After Slither-oriented renames, fixed shadowing bugs (`value = value`, `num = num`), aligned bodies with new parameter names, removed drift-prone `/// @param` lines under `src/` (excluding `src/hacks/`), added `scripts/strip_natspec_params.py`, and updated tests (`ERC20Permit`, `GasGolf`, `Immutable`). Full suite green via `forge test` in Docker.
1010
- [x] **Slither / Code Scanning (zero address)**: Added `require(... != address(0), "Zero address")` on low-level call entry points flagged in PR review (`Call`, `SendingEther`, `TryCatch`, `Payable.withdrawTo`, `Immutable` constructor, `Delegatecall` proxy + demo), with matching revert tests.
11+
- [x] **Codecov**: Upgraded `codecov/codecov-action` to v5, added root `codecov.yml` (informational checks, PR comment layout), documented installing the [Codecov GitHub App](https://github.com/marketplace/codecov) in `CI.md` for reliable uploads and PR comments.
1112

1213
### ✅ Phase 1: Project Setup
1314
- [x] Copy training documentation to repo

codecov.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# https://docs.codecov.com/docs/codecov-yaml
2+
# PR comments and reliable uploads work best when the Codecov GitHub App is
3+
# installed on this repository (Settings → Integrations on codecov.io).
4+
5+
codecov:
6+
require_ci_to_pass: false
7+
8+
coverage:
9+
status:
10+
project:
11+
default:
12+
informational: true
13+
patch:
14+
default:
15+
informational: true
16+
17+
comment:
18+
layout: "reach,diff,flags,tree,footer"
19+
behavior: default
20+
require_changes: false
21+
22+
github_checks:
23+
annotations: true

0 commit comments

Comments
 (0)