Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Upload Nuxt and SvelteKit example stats #138

Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,12 @@ jobs:
env:
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
NEXT_API_URL: ${{ secrets.CODECOV_API_URL }}
NUXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
NUXT_API_URL: ${{ secrets.CODECOV_API_URL }}
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
ROLLUP_API_URL: ${{ secrets.CODECOV_API_URL }}
SVELTEKIT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
SVELTEKIT_API_URL: ${{ secrets.CODECOV_API_URL }}
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
VITE_API_URL: ${{ secrets.CODECOV_API_URL }}
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
Expand Down Expand Up @@ -390,8 +394,12 @@ jobs:
env:
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
NEXT_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
Copy link

Choose a reason for hiding this comment

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

For the NUXT_UPLOAD_TOKEN, it seems like we're using the production token (CODECOV_ORG_TOKEN) instead of the staging token (CODECOV_ORG_TOKEN_STAGING). If this block is for a staging environment, we might need to use the staging token.

NUXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
NUXT_API_URL: ${{ secrets.CODECOV_API_URL }}
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
ROLLUP_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
Copy link

Choose a reason for hiding this comment

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

For the SVELTEKIT_UPLOAD_TOKEN, it seems like we're using the production token (CODECOV_ORG_TOKEN) instead of the staging token (CODECOV_ORG_TOKEN_STAGING). If this block is for a staging environment, we might need to use the staging token.

SVELTEKIT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
SVELTEKIT_API_URL: ${{ secrets.CODECOV_API_URL }}
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
VITE_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
Expand Down
5 changes: 2 additions & 3 deletions examples/nuxt/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ export default defineNuxtConfig({
[
"@codecov/nuxt-plugin",
{
dryRun: true,
Copy link

@codecov codecov bot Jun 3, 2024

Choose a reason for hiding this comment

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

The dryRun option is removed from here. Should it be added to the environment config or is it not required anymore for the @codecov/nuxt-plugin?

enableBundleAnalysis: true,
bundleName: "@codecov/example-nuxt-app",
uploadToken: process.env.VITE_UPLOAD_TOKEN,
apiUrl: process.env.VITE_API_URL,
uploadToken: process.env.NUXT_UPLOAD_TOKEN,
Copy link

Choose a reason for hiding this comment

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

Good change to avoid hardcoding the uploadToken and apiUrl. Using environment variables improves security and maintains consistency with other configurations.

apiUrl: process.env.NUXT_API_URL,
},
],
],
Expand Down
4 changes: 2 additions & 2 deletions examples/sveltekit/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export default defineConfig({
plugins: [
sveltekit(),
codecovSvelteKitPlugin({
dryRun: true,
Copy link

@codecov codecov bot Jun 3, 2024

Choose a reason for hiding this comment

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

The dryRun option is removed from here. Should it be added to the environment config or is it not required anymore for the codecovSvelteKitPlugin?

enableBundleAnalysis: true,
uploadToken: "test-token",
bundleName: "@codecov/example-sveltekit-app",
uploadToken: process.env.SVELTEKIT_UPLOAD_TOKEN,
apiUrl: process.env.SVELTEKIT_API_URL,
Copy link

Choose a reason for hiding this comment

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

Good change to avoid hardcoding the uploadToken. Using environment variables improves security and keeps consistency with other configurations.

}),
],
});
Loading