Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 21 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@ jobs:
'nx-never-restore'}}

- name: Build packages
# Set the CODECOV_TOKEN for Bundle Analysis
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: yarn build

- name: Upload build artifacts
Expand Down Expand Up @@ -431,18 +428,12 @@ jobs:
run: yarn test:ci:browser
if: github.event_name != 'pull_request'

- name: Compute test coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
uses: getsentry/codecov-action@main
with:
files: packages/**/*.junit.xml
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
Comment on lines 432 to +436
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The workflow references a non-existent GitHub Action, getsentry/codecov-action@main, which will cause CI jobs for coverage and test reporting to fail.
Severity: HIGH

Suggested Fix

Replace the reference to the non-existent action getsentry/codecov-action@main with the correct, official action for uploading coverage reports, such as codecov/codecov-action. Ensure all required parameters like token are correctly configured for the official action.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/build.yml#L432-L436

Potential issue: The CI workflow file `.github/workflows/build.yml` is updated to use a
new custom GitHub Action, `getsentry/codecov-action@main`, for uploading code coverage
reports. However, this action does not appear to exist in the specified repository or
any public location. When the workflow is triggered, GitHub Actions will fail to resolve
this action, causing an immediate failure of any job that attempts to use it. This will
prevent all code coverage and test result uploads from completing successfully, blocking
the CI/CD pipeline.


job_bun_unit_tests:
name: Bun Unit Tests
Expand Down Expand Up @@ -538,18 +529,12 @@ jobs:
env:
NODE_VERSION: ${{ matrix.node }}

- name: Compute test coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
uses: getsentry/codecov-action@main
with:
files: packages/**/*.junit.xml
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

job_browser_playwright_tests:
name:
Expand Down Expand Up @@ -644,13 +629,13 @@ jobs:
overwrite: true
retention-days: 7

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
uses: getsentry/codecov-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
directory: dev-packages/browser-integration-tests
token: ${{ secrets.CODECOV_TOKEN }}

job_browser_loader_tests:
name: PW ${{ matrix.bundle }} Tests
Expand Down Expand Up @@ -705,13 +690,13 @@ jobs:
overwrite: true
retention-days: 7

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
uses: getsentry/codecov-action@main
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
directory: dev-packages/browser-integration-tests
token: ${{ secrets.CODECOV_TOKEN }}

job_check_for_faulty_dts:
name: Check for faulty .d.ts files
Expand Down Expand Up @@ -779,13 +764,13 @@ jobs:
working-directory: dev-packages/node-integration-tests
run: yarn test

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
uses: getsentry/codecov-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
directory: dev-packages/node-integration-tests
token: ${{ secrets.CODECOV_TOKEN }}

job_cloudflare_integration_tests:
name: Cloudflare Integration Tests
Expand Down Expand Up @@ -846,13 +831,13 @@ jobs:
cd packages/remix
yarn test:integration:ci

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
uses: getsentry/codecov-action@main
with:
directory: packages/remix
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

job_e2e_prepare:
name: Prepare E2E tests
Expand Down Expand Up @@ -1037,13 +1022,13 @@ jobs:
retention-days: 7
if-no-files-found: ignore

- name: Upload test results to Codecov
- name: Parse and Upload Coverage
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
uses: getsentry/codecov-action@main
with:
directory: dev-packages/e2e-tests
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

# - We skip optional tests on release branches
job_optional_e2e_tests:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ faster, so we can get back to enjoying technology. If you want to join us
[<kbd>**Check out our open positions**</kbd>](https://sentry.io/careers/)_

[![Build & Test](https://github.com/getsentry/sentry-javascript/workflows/CI:%20Build%20&%20Test/badge.svg)](https://github.com/getsentry/sentry-javascript/actions)
[![codecov](https://codecov.io/gh/getsentry/sentry-javascript/branch/develop/graph/badge.svg)](https://codecov.io/gh/getsentry/sentry-javascript)
[![npm version](https://img.shields.io/npm/v/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core)
[![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)

Expand Down
5 changes: 0 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ codecov:
notify:
require_ci_to_pass: no

ai_pr_review:
enabled: true
method: 'label'
label_name: 'ci-codecov-ai-review'

coverage:
precision: 2
round: down
Expand Down
15 changes: 0 additions & 15 deletions dev-packages/rollup-utils/plugins/npmPlugins.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,3 @@ export function makeRrwebBuildPlugin({ excludeShadowDom, excludeIframe } = {}) {
values,
});
}

/**
* Plugin that uploads bundle analysis to codecov.
*
* @param type The type of bundle being uploaded.
* @param prefix The prefix for the codecov bundle name. Defaults to 'npm'.
*/
export function makeCodeCovPlugin() {
const packageJson = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), './package.json'), { encoding: 'utf8' }));
return codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: packageJson.name,
uploadToken: process.env.CODECOV_TOKEN,
});
}
Loading