Skip to content

Commit 5e93bdc

Browse files
[🔥AUDIT🔥] Update codecov to v5 action and add bundle analysis (#1799)
🖍 _This is an audit!_ 🖍 ## Summary: Dependabot wanted to do this update for me, but I wanted to add the bundle analysis to see what that looks like, so I've done it manually. Kept the old filesize plugin for rollup because the codecov action doesn't output info locally, it seems. Issue: XXX-XXXX ## Test plan: `pnpm clean & pnpm build` Going to see what the bundle analysis for codecov looks like on this PR. Author: somewhatabstract Auditors: copilot-pull-request-reviewer[bot] Required Reviewers: Approved By: Checks: ✅ 8 checks were successful, ⏭️ 1 check has been skipped Pull Request URL: #1799
1 parent 6c72352 commit 5e93bdc

File tree

7 files changed

+258
-10
lines changed

7 files changed

+258
-10
lines changed

.changeset/empty-memes-open.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.codecov.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ coverage:
55

66
status:
77
project:
8-
default: on
8+
default: true
99
patch:
10-
default: off
10+
default: false
1111
changes:
12-
default: off
12+
default: false
1313

1414
comment:
1515
layout: "header, reach, diff, flags, files, footer"
1616
behavior: default
17-
require_changes: no
18-
require_base: no
19-
require_head: yes
17+
require_changes: false
18+
require_base: false
19+
require_head: true

.github/workflows/nodejs.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: Run tests with coverage
8888
run: pnpm coverage
8989
- name: Upload coverage
90-
uses: codecov/codecov-action@v4
90+
uses: codecov/codecov-action@v5
9191
env:
9292
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9393

@@ -123,4 +123,8 @@ jobs:
123123
run: pnpm install --frozen-lockfile
124124

125125
- name: Run tests and build
126+
env:
127+
# We only want to upload bundle analysis for a PR once,
128+
# so we only provide a token for the ubuntu-latest job.
129+
CODECOV_TOKEN: ${{ matrix.os == 'ubuntu-latest' && secrets.CODECOV_TOKEN || '' }}
126130
run: pnpm build

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,7 @@ jobs:
6464
# the account of someone with appropriate access levels and given the
6565
# repo scope.
6666
GITHUB_TOKEN: ${{ secrets.BOT_PA_TOKEN }}
67+
# This is used for the publish step to allow access to NPM.
6768
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
# This is used for the bundle analysis
70+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@babel/preset-env": "^7.26.9",
3939
"@babel/preset-typescript": "^7.27.0",
4040
"@changesets/cli": "^2.28.1",
41+
"@codecov/rollup-plugin": "^1.9.0",
4142
"@eslint/compat": "^1.2.8",
4243
"@eslint/eslintrc": "^3.3.1",
4344
"@eslint/js": "^9.24.0",

0 commit comments

Comments
 (0)