Skip to content

Commit

Permalink
ci(codecov): JavaScrit bundle analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Dec 6, 2024
1 parent ecf62b8 commit ed2019d
Show file tree
Hide file tree
Showing 21 changed files with 390 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
yarn install
- name: Build & Test
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
yarn build
yarn lint
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
yarn install
- name: Build & Test
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
yarn build
yarn lint
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
yarn up
yarn install
- name: Build & Test
run: |
yarn build
yarn lint
yarn test
- name: Publish packages
run: |
yarn ci-publish
2 changes: 2 additions & 0 deletions .github/workflows/ci-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
yarn install
- name: Build & Test
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
yarn build
yarn lint
Expand Down
1 change: 1 addition & 0 deletions packages/changelog-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@babel/eslint-plugin": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@trendmicro/babel-config": "^1.0.2",
Expand Down
14 changes: 14 additions & 0 deletions packages/changelog-github/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -27,6 +29,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -40,6 +48,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/react-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@emotion/babel-plugin": "^11.10.0",
"@emotion/jest": "^11.10.0",
"@rollup/plugin-babel": "^6.0.0",
Expand Down
14 changes: 14 additions & 0 deletions packages/react-base/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -26,6 +28,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -39,6 +47,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@testing-library/jest-dom": "^6.0.0",
Expand Down
14 changes: 14 additions & 0 deletions packages/react-hooks/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -27,6 +29,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -40,6 +48,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/react-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@codecov/rollup-plugin": "^1.5.1",
"@emotion/babel-plugin": "^11.11.0",
"@emotion/react": "11.x",
"@trendmicro/babel-config": "^1.0.2",
Expand Down
14 changes: 14 additions & 0 deletions packages/react-icons/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -26,6 +28,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -39,6 +47,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@emotion/babel-plugin": "^11.10.0",
"@emotion/jest": "^11.10.0",
"@rollup/plugin-babel": "^6.0.0",
Expand Down
14 changes: 14 additions & 0 deletions packages/react/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -26,6 +28,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -39,6 +47,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/styled-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@babel/eslint-plugin": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@trendmicro/babel-config": "^1.0.2",
Expand Down
14 changes: 14 additions & 0 deletions packages/styled-system/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -27,6 +29,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -40,6 +48,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@babel/eslint-plugin": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@trendmicro/babel-config": "^1.0.2",
Expand Down
14 changes: 14 additions & 0 deletions packages/theme/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down Expand Up @@ -35,6 +37,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -48,6 +56,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
1 change: 1 addition & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@babel/eslint-plugin": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@codecov/rollup-plugin": "^1.5.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@trendmicro/babel-config": "^1.0.2",
Expand Down
14 changes: 14 additions & 0 deletions packages/utils/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { codecovRollupPlugin } from '@codecov/rollup-plugin';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -27,6 +29,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.main,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
{
Expand All @@ -40,6 +48,12 @@ export default [
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled' }),
// Put the Codecov rollup plugin after all other plugins
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: pkg.name + '/' + pkg.module,
uploadToken: process.env.CODECOV_TOKEN,
}),
],
}
];
Loading

0 comments on commit ed2019d

Please sign in to comment.