mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 22:39:34 +08:00
test: enable codecov bundle analysis (#50384)
This commit is contained in:
parent
700e0aeebe
commit
2f64ecf7a8
1
.github/workflows/size-limit.yml
vendored
1
.github/workflows/size-limit.yml
vendored
@ -27,5 +27,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
PRODUCTION_ONLY: 1
|
PRODUCTION_ONLY: 1
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
NO_DUP_CHECK: 1
|
NO_DUP_CHECK: 1
|
||||||
CI_JOB_NUMBER: 1
|
CI_JOB_NUMBER: 1
|
||||||
|
@ -156,6 +156,7 @@
|
|||||||
"@antv/g6": "^4.8.24",
|
"@antv/g6": "^4.8.24",
|
||||||
"@babel/eslint-plugin": "^7.24.7",
|
"@babel/eslint-plugin": "^7.24.7",
|
||||||
"@biomejs/biome": "^1.8.3",
|
"@biomejs/biome": "^1.8.3",
|
||||||
|
"@codecov/webpack-plugin": "^0.0.1-beta.10",
|
||||||
"@codesandbox/sandpack-react": "^2.18.0",
|
"@codesandbox/sandpack-react": "^2.18.0",
|
||||||
"@dnd-kit/core": "^6.1.0",
|
"@dnd-kit/core": "^6.1.0",
|
||||||
"@dnd-kit/modifiers": "^7.0.0",
|
"@dnd-kit/modifiers": "^7.0.0",
|
||||||
|
@ -35,17 +35,13 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
width: 33%;
|
||||||
}
|
}
|
||||||
|
|
||||||
td img {
|
td img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
width: 33%;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
@ -112,4 +108,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// This config is for building dist files
|
// This config is for building dist files
|
||||||
const getWebpackConfig = require('@ant-design/tools/lib/getWebpackConfig');
|
const getWebpackConfig = require('@ant-design/tools/lib/getWebpackConfig');
|
||||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||||
|
const { codecovWebpackPlugin } = require('@codecov/webpack-plugin');
|
||||||
const { EsbuildPlugin } = require('esbuild-loader');
|
const { EsbuildPlugin } = require('esbuild-loader');
|
||||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||||
const DuplicatePackageCheckerPlugin = require('@madccc/duplicate-package-checker-webpack-plugin');
|
const DuplicatePackageCheckerPlugin = require('@madccc/duplicate-package-checker-webpack-plugin');
|
||||||
@ -39,6 +40,15 @@ if (process.env.PRODUCTION_ONLY) {
|
|||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('🍐 Build production only');
|
console.log('🍐 Build production only');
|
||||||
webpackConfig = webpackConfig.filter((config) => config.mode === 'production');
|
webpackConfig = webpackConfig.filter((config) => config.mode === 'production');
|
||||||
|
webpackConfig.forEach((config) => {
|
||||||
|
config.plugins.push(
|
||||||
|
codecovWebpackPlugin({
|
||||||
|
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
|
||||||
|
bundleName: 'antd',
|
||||||
|
uploadToken: process.env.CODECOV_TOKEN,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.RUN_ENV === 'PRODUCTION') {
|
if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||||
|
Loading…
Reference in New Issue
Block a user