Skip to content

Commit b64f3c2

Browse files
feat: added support for the new codecov action
1 parent 80b4705 commit b64f3c2

3 files changed

Lines changed: 19 additions & 58 deletions

File tree

.github/workflows/build.yml

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ jobs:
175175
'nx-never-restore'}}
176176

177177
- name: Build packages
178-
# Set the CODECOV_TOKEN for Bundle Analysis
179-
env:
180-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
181178
run: yarn build
182179

183180
- name: Upload build artifacts
@@ -432,17 +429,9 @@ jobs:
432429
if: github.event_name != 'pull_request'
433430

434431
- name: Compute test coverage
435-
uses: codecov/codecov-action@v5
436-
with:
437-
token: ${{ secrets.CODECOV_TOKEN }}
438-
439-
- name: Upload test results to Codecov
440-
if: cancelled() == false
441-
continue-on-error: true
442-
uses: codecov/test-results-action@v1
432+
uses: getsentry/codecov-action@main
443433
with:
444-
files: packages/**/*.junit.xml
445-
token: ${{ secrets.CODECOV_TOKEN }}
434+
token: ${{ secrets.GITHUB_TOKEN }}
446435

447436
job_bun_unit_tests:
448437
name: Bun Unit Tests
@@ -539,17 +528,9 @@ jobs:
539528
NODE_VERSION: ${{ matrix.node }}
540529

541530
- name: Compute test coverage
542-
uses: codecov/codecov-action@v5
531+
uses: getsentry/codecov-action@main
543532
with:
544-
token: ${{ secrets.CODECOV_TOKEN }}
545-
546-
- name: Upload test results to Codecov
547-
if: cancelled() == false
548-
continue-on-error: true
549-
uses: codecov/test-results-action@v1
550-
with:
551-
files: packages/**/*.junit.xml
552-
token: ${{ secrets.CODECOV_TOKEN }}
533+
token: ${{ secrets.GITHUB_TOKEN }}
553534

554535
job_browser_playwright_tests:
555536
name:
@@ -641,13 +622,13 @@ jobs:
641622
overwrite: true
642623
retention-days: 7
643624

644-
- name: Upload test results to Codecov
625+
- name: Compute test coverage
645626
if: cancelled() == false
646627
continue-on-error: true
647-
uses: codecov/test-results-action@v1
628+
uses: getsentry/codecov-action@main
648629
with:
630+
token: ${{ secrets.GITHUB_TOKEN }}
649631
directory: dev-packages/browser-integration-tests
650-
token: ${{ secrets.CODECOV_TOKEN }}
651632

652633
job_browser_loader_tests:
653634
name: PW ${{ matrix.bundle }} Tests
@@ -702,13 +683,13 @@ jobs:
702683
overwrite: true
703684
retention-days: 7
704685

705-
- name: Upload test results to Codecov
686+
- name: Compute test coverage
687+
uses: getsentry/codecov-action@main
706688
if: cancelled() == false
707689
continue-on-error: true
708-
uses: codecov/test-results-action@v1
709690
with:
691+
token: ${{ secrets.GITHUB_TOKEN }}
710692
directory: dev-packages/browser-integration-tests
711-
token: ${{ secrets.CODECOV_TOKEN }}
712693

713694
job_check_for_faulty_dts:
714695
name: Check for faulty .d.ts files
@@ -776,13 +757,13 @@ jobs:
776757
working-directory: dev-packages/node-integration-tests
777758
run: yarn test
778759

779-
- name: Upload test results to Codecov
760+
- name: Compute test coverage
780761
if: cancelled() == false
781762
continue-on-error: true
782-
uses: codecov/test-results-action@v1
763+
uses: getsentry/codecov-action@main
783764
with:
765+
token: ${{ secrets.GITHUB_TOKEN }}
784766
directory: dev-packages/node-integration-tests
785-
token: ${{ secrets.CODECOV_TOKEN }}
786767

787768
job_cloudflare_integration_tests:
788769
name: Cloudflare Integration Tests
@@ -843,13 +824,13 @@ jobs:
843824
cd packages/remix
844825
yarn test:integration:ci
845826
846-
- name: Upload test results to Codecov
827+
- name: Compute test coverage
847828
if: cancelled() == false
848829
continue-on-error: true
849-
uses: codecov/test-results-action@v1
830+
uses: getsentry/codecov-action@main
850831
with:
851832
directory: packages/remix
852-
token: ${{ secrets.CODECOV_TOKEN }}
833+
token: ${{ secrets.GITHUB_TOKEN }}
853834

854835
job_e2e_prepare:
855836
name: Prepare E2E tests
@@ -1034,13 +1015,13 @@ jobs:
10341015
retention-days: 7
10351016
if-no-files-found: ignore
10361017

1037-
- name: Upload test results to Codecov
1018+
- name: Compute test coverage
10381019
if: cancelled() == false
10391020
continue-on-error: true
1040-
uses: codecov/test-results-action@v1
1021+
uses: getsentry/codecov-action@main
10411022
with:
10421023
directory: dev-packages/e2e-tests
1043-
token: ${{ secrets.CODECOV_TOKEN }}
1024+
token: ${{ secrets.GITHUB_TOKEN }}
10441025

10451026
# - We skip optional tests on release branches
10461027
job_optional_e2e_tests:

codecov.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ codecov:
33
notify:
44
require_ci_to_pass: no
55

6-
ai_pr_review:
7-
enabled: true
8-
method: 'label'
9-
label_name: 'ci-codecov-ai-review'
10-
116
coverage:
127
precision: 2
138
round: down

dev-packages/rollup-utils/plugins/npmPlugins.mjs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,3 @@ export function makeRrwebBuildPlugin({ excludeShadowDom, excludeIframe } = {}) {
167167
values,
168168
});
169169
}
170-
171-
/**
172-
* Plugin that uploads bundle analysis to codecov.
173-
*
174-
* @param type The type of bundle being uploaded.
175-
* @param prefix The prefix for the codecov bundle name. Defaults to 'npm'.
176-
*/
177-
export function makeCodeCovPlugin() {
178-
const packageJson = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), './package.json'), { encoding: 'utf8' }));
179-
return codecovRollupPlugin({
180-
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
181-
bundleName: packageJson.name,
182-
uploadToken: process.env.CODECOV_TOKEN,
183-
});
184-
}

0 commit comments

Comments
 (0)