Skip to content

Commit

Permalink
Merge pull request #962 from marekdedic/relative-ci-multi-build
Browse files Browse the repository at this point in the history
Tracking build size for both native & jquery builds
  • Loading branch information
marekdedic authored Jun 26, 2024
2 parents 8e51979 + 6e76fac commit bd2af41
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ jobs:
name: "docs"
path: docs

- name: Upload webpack stats artifact
uses: relative-ci/agent-upload-artifact-action@v2.0.0
- name: Prepare webpack-stats dir
run: |
mkdir relative-ci-artifacts
cp dist/webpack-stats.* relative-ci-artifacts/
- name: Upload webpack-stats
uses: actions/upload-artifact@v3
with:
webpackStatsFile: dist/webpack-stats.json
name: relative-ci-artifacts
path: relative-ci-artifacts

test:
name: "Test"
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/relativeci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ jobs:
process-stats:
runs-on: ubuntu-latest
steps:
- name: Send bundle stats and build information to RelativeCI
- name: Send jquery bundle stats and build information to RelativeCI
uses: relative-ci/agent-action@v2.1.11
with:
key: ${{ secrets.RELATIVE_CI_KEY_JQUERY }}
token: ${{ secrets.GITHUB_TOKEN }}
webpackStatsFile: webpack-stats.jquery.json

- name: Send native bundle stats and build information to RelativeCI
uses: relative-ci/agent-action@v2.1.10
with:
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
webpackStatsFile: webpack-stats.native.json
2 changes: 2 additions & 0 deletions jquery.vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* eslint-env node */

import { resolve } from "path";
import { webpackStats } from "rollup-plugin-webpack-stats";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [webpackStats({ fileName: "webpack-stats.jquery.json" })],
build: {
lib: {
entry: resolve(__dirname, "src/lib/imagelightbox.jquery.ts"),
Expand Down
2 changes: 1 addition & 1 deletion native.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { webpackStats } from "rollup-plugin-webpack-stats";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [webpackStats()],
plugins: [webpackStats({ fileName: "webpack-stats.native.json" })],
build: {
lib: {
entry: resolve(__dirname, "src/lib/imagelightbox.ts"),
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"files": [
"dist",
"!dist/webpack-stats.json",
"!dist/webpack-stats.jquery.json",
"!dist/webpack-stats.native.json",
"docs",
"types",
"LICENSE",
Expand Down

0 comments on commit bd2af41

Please sign in to comment.