mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
ci(codecov): add bundle analysis (#3843)
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Linux Flatpak (aarch64, ubuntu-22.04-arm) (push) Has been cancelled
CI / Linux Flatpak (x86_64, ubuntu-22.04) (push) Has been cancelled
CI / Linux AppImage (push) Has been cancelled
CI / Homebrew (macos-13) (push) Has been cancelled
CI / Homebrew (macos-14) (push) Has been cancelled
CI / Homebrew (ubuntu-latest) (push) Has been cancelled
CI / Homebrew (ubuntu-latest (Release)) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled
Build GH-Pages / prep (push) Has been cancelled
Build GH-Pages / call-jekyll-build (push) Has been cancelled
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Linux Flatpak (aarch64, ubuntu-22.04-arm) (push) Has been cancelled
CI / Linux Flatpak (x86_64, ubuntu-22.04) (push) Has been cancelled
CI / Linux AppImage (push) Has been cancelled
CI / Homebrew (macos-13) (push) Has been cancelled
CI / Homebrew (macos-14) (push) Has been cancelled
CI / Homebrew (ubuntu-latest) (push) Has been cancelled
CI / Homebrew (ubuntu-latest (Release)) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled
Build GH-Pages / prep (push) Has been cancelled
Build GH-Pages / call-jekyll-build (push) Has been cancelled
This commit is contained in:
1
.github/workflows/CI.yml
vendored
1
.github/workflows/CI.yml
vendored
@@ -952,6 +952,7 @@ jobs:
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ needs.setup_release.outputs.release_tag }}
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
COMMIT: ${{ needs.setup_release.outputs.release_commit }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"vue-i18n": "11.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codecov/vite-plugin": "1.9.0",
|
||||
"@vitejs/plugin-vue": "4.6.2",
|
||||
"serve": "14.2.3",
|
||||
"vite": "4.5.9",
|
||||
|
||||
@@ -3,13 +3,14 @@ import fs from 'fs';
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import { ViteEjsPlugin } from "vite-plugin-ejs";
|
||||
import { codecovVitePlugin } from "@codecov/vite-plugin";
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import process from 'process'
|
||||
|
||||
/**
|
||||
* Before actually building the pages with Vite, we do an intermediate build step using ejs
|
||||
* Importing this separately and joining them using ejs
|
||||
* allows us to split some repeating HTML that cannot be added
|
||||
* Importing this separately and joining them using ejs
|
||||
* allows us to split some repeating HTML that cannot be added
|
||||
* by Vue itself (e.g. style/script loading, common meta head tags, Widgetbot)
|
||||
* The vite-plugin-ejs handles this automatically
|
||||
*/
|
||||
@@ -49,7 +50,16 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
base: './',
|
||||
plugins: [vue(), ViteEjsPlugin({ header })],
|
||||
plugins: [
|
||||
vue(),
|
||||
ViteEjsPlugin({ header }),
|
||||
// The Codecov vite plugin should be after all other plugins
|
||||
codecovVitePlugin({
|
||||
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
|
||||
bundleName: "sunshine",
|
||||
uploadToken: process.env.CODECOV_TOKEN,
|
||||
}),
|
||||
],
|
||||
root: resolve(assetsSrcPath),
|
||||
build: {
|
||||
outDir: resolve(assetsDstPath),
|
||||
|
||||
Reference in New Issue
Block a user