Skip to content

Commit

Permalink
add codecov bundle analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Logicer16 committed Nov 23, 2024
1 parent 9980e5f commit 91f46ae
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ jobs:

- name: Build
run: pnpm build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Type Check
run: pnpm tsc
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"pnpm": ">=8.10.0"
},
"devDependencies": {
"@codecov/vite-plugin": "^1.4.0",
"@logicer/eslint-plugin": "^4.0.3",
"@logicer/prettier-config": "^2.1.0",
"@logicer/tsconfig": "^5.0.1",
Expand Down
198 changes: 198 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
* @file Vite config.
*/
/// <reference types="vitest/config" />
import {codecovVitePlugin} from "@codecov/vite-plugin";
import {defineConfig} from "vite";
import {externalizeDeps} from "vite-plugin-externalize-deps";
import process from "node:process";
import {resolve} from "node:path";
import vitePluginDTS from "vite-plugin-dts";

Expand Down Expand Up @@ -37,8 +39,11 @@ export default defineConfig({
declarationMap: true
},
exclude: "**/*.test.*"

// rollupTypes: true
}),
codecovVitePlugin({
bundleName: "wgconfgen",
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
uploadToken: process.env.CODECOV_TOKEN
})
],
test: {
Expand Down

0 comments on commit 91f46ae

Please sign in to comment.