mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
test: 📦 add compressed-size-action (#25902)
This commit is contained in:
16
.github/workflows/compressed-size.yml
vendored
Normal file
16
.github/workflows/compressed-size.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: 📦 Compressed Size
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_JOB_NUMBER: 1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: preactjs/compressed-size-action@v2
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -143,7 +143,7 @@ describe('ConfigProvider.Locale', () => {
|
||||
const wrapper = wrapperComponent({ validateMessages: { required: '必须' } });
|
||||
|
||||
wrapper.find('form').simulate('submit');
|
||||
await delay(50);
|
||||
await delay(200);
|
||||
wrapper.update();
|
||||
|
||||
expect(wrapper.find('.ant-form-item-explain').first().text()).toEqual('必须');
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "antd",
|
||||
"version": "4.5.1",
|
||||
"description": "An enterprise-class UI design language and React components implementation",
|
||||
"title": "Ant Design",
|
||||
"keywords": [
|
||||
"ant",
|
||||
"component",
|
||||
@@ -154,7 +155,6 @@
|
||||
"@ant-design/hitu": "^0.0.0-alpha.13",
|
||||
"@ant-design/tools": "^10.0.1",
|
||||
"@qixian.cs/github-contributors-list": "^1.0.3",
|
||||
"@relative-ci/agent": "^1.3.0",
|
||||
"@stackblitz/sdk": "^1.3.0",
|
||||
"@types/classnames": "^2.2.8",
|
||||
"@types/enzyme": "^3.10.5",
|
||||
@@ -181,7 +181,6 @@
|
||||
"bisheng-plugin-description": "^0.1.4",
|
||||
"bisheng-plugin-react": "^1.1.0",
|
||||
"bisheng-plugin-toc": "^0.4.4",
|
||||
"bundle-stats-webpack-plugin": "^2.2.0",
|
||||
"bundlesize": "^0.18.0",
|
||||
"chalk": "^4.0.0",
|
||||
"cheerio": "^1.0.0-rc.3",
|
||||
@@ -309,6 +308,5 @@
|
||||
],
|
||||
"tnpm": {
|
||||
"mode": "npm"
|
||||
},
|
||||
"title": "Ant Design"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,21 +52,6 @@ function injectWarningCondition(config) {
|
||||
});
|
||||
}
|
||||
|
||||
function addBundleStatsWebpackPlugin(config) {
|
||||
if (!process.env.CIRCLECI || process.env.RUN_ENV !== 'PRODUCTION') {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line global-require
|
||||
const { BundleStatsWebpackPlugin } = require('bundle-stats-webpack-plugin');
|
||||
// eslint-disable-next-line global-require
|
||||
const { RelativeCiAgentWebpackPlugin } = require('@relative-ci/agent');
|
||||
config.plugins.push(new BundleStatsWebpackPlugin());
|
||||
|
||||
if (config.entry['antd.min']) {
|
||||
config.plugins.push(new RelativeCiAgentWebpackPlugin());
|
||||
}
|
||||
}
|
||||
|
||||
function processWebpackThemeConfig(themeConfig, theme, vars) {
|
||||
themeConfig.forEach(config => {
|
||||
ignoreMomentLocale(config);
|
||||
@@ -124,8 +109,6 @@ if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
reportFilename: '../report.html',
|
||||
}),
|
||||
);
|
||||
|
||||
addBundleStatsWebpackPlugin(config);
|
||||
});
|
||||
|
||||
processWebpackThemeConfig(webpackDarkConfig, 'dark', darkVars);
|
||||
|
||||
Reference in New Issue
Block a user