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

ci(frontend): Add Codecov Bundle Analysis #167

Merged
merged 2 commits into from
Mar 12, 2024
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
27 changes: 27 additions & 0 deletions .github/workflows/js-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "JS CI"

on:
push:
branches:
- 'main'
pull_request:
branches:
- '*'

permissions:
contents: read

jobs:
js-ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Run npm install
run: npm install

- name: Run npm build
run: npm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
61 changes: 61 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"vuex": "^4.1.0"
},
"devDependencies": {
"@codecov/vite-plugin": "^0.0.1-beta.4",
"@rushstack/eslint-patch": "^1.7.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
Expand Down
6 changes: 6 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath, URL } from 'node:url';
import { defineConfig, loadEnv } from "vite";
import vue from '@vitejs/plugin-vue';
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { codecovVitePlugin } from "@codecov/vite-plugin";

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand All @@ -22,6 +23,11 @@ export default defineConfig(({ mode }) => {
release: env.RELEASE,
telemetry: false
}),
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "gib-potato",
uploadToken: process.env.CODECOV_TOKEN,
}),
],
build: {
sourcemap: true,
Expand Down
Loading