ci: move bundle analysis to separate job (#4361)
This commit is contained in:
parent
c2fb5438af
commit
a7f03c25fd
4 changed files with 36 additions and 5 deletions
29
.github/workflows/ci-bundle.yml
vendored
Normal file
29
.github/workflows/ci-bundle.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
name: CI-Bundle
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
CODECOV_TOKEN:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
bundle_analysis:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup node
|
||||
id: node
|
||||
uses: actions/setup-node@v6
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: npm run build
|
||||
4
.github/workflows/ci-windows.yml
vendored
4
.github/workflows/ci-windows.yml
vendored
|
|
@ -12,9 +12,6 @@ on:
|
|||
release_version:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
CODECOV_TOKEN:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
|
|
@ -258,7 +255,6 @@ jobs:
|
|||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ inputs.release_version }}
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
COMMIT: ${{ inputs.release_commit }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
|
|
|
|||
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -118,6 +118,11 @@ jobs:
|
|||
with:
|
||||
release_commit: ${{ needs.release-setup.outputs.release_commit }}
|
||||
release_version: ${{ needs.release-setup.outputs.release_version }}
|
||||
|
||||
bundle-analysis:
|
||||
name: Bundle Analysis
|
||||
needs: release-setup
|
||||
uses: ./.github/workflows/ci-bundle.yml
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,10 @@ export default defineConfig({
|
|||
ViteEjsPlugin({ header }),
|
||||
// The Codecov vite plugin should be after all other plugins
|
||||
codecovVitePlugin({
|
||||
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
|
||||
enableBundleAnalysis: true,
|
||||
bundleName: "sunshine",
|
||||
uploadToken: process.env.CODECOV_TOKEN,
|
||||
gitService: "github",
|
||||
}),
|
||||
],
|
||||
root: resolve(assetsSrcPath),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue