Skip to content

Commit

Permalink
ci: Publish npm bundle analysis to codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
g3n35i5 committed Feb 5, 2025
1 parent ebc43ed commit 14c837a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:

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

- name: Build python app
run: tox run -e build
Expand Down
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { TanStackRouterVite } from '@tanstack/router-plugin/vite'
import { compression } from 'vite-plugin-compression2'
import { codecovVitePlugin } from '@codecov/vite-plugin'

// https://vite.dev/config/
export default defineConfig({
plugins: [
TanStackRouterVite({ routesDirectory: 'src/ui/routes/', generatedRouteTree: 'src/ui/routeTree.gen.ts' }),
react(),
compression(),
// Put the Codecov vite plugin after all other plugins
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: 'vdoc',
uploadToken: process.env.CODECOV_TOKEN,
telemetry: false,
}),
],
root: 'src/ui',
build: {
Expand Down

0 comments on commit 14c837a

Please sign in to comment.