From 98ddb8d8dabc25f3782bfb12d20695a72459c38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Mon, 30 Nov 2020 20:14:03 +0800 Subject: [PATCH] chore: RM circle ci (#28080) * chore: RM circle ci * docs: RM circle docs * test: Add dom test ci * test: Add bundleSize & check demo * chore: Trigger action * chore: Trigger action --- .circleci/config.yml | 173 ------------------------------------- .github/workflows/test.yml | 52 ++++++++++- README-pt_BR.md | 4 +- README-zh_CN.md | 4 +- README.md | 4 +- package.json | 2 +- 6 files changed, 55 insertions(+), 184 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index caa598fd98..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,173 +0,0 @@ -version: 2 - -references: - container_config: &container_config - docker: - - image: circleci/node:14 - working_directory: ~/ant-design - - attach_workspace: &attach_workspace - attach_workspace: - at: ~/ant-design - - react_16: &react_16 - environment: - REACT: 16 - - workflow: &workflow - jobs: - - setup: - filters: - branches: - ignore: gh-pages - - dist: - requires: - - setup - - compile: - requires: - - setup - - lint: - requires: - - setup - - test_dist: - requires: - - dist - - test_lib: - requires: - - compile - - test_es: - requires: - - compile - - test_dom: - requires: - - setup - - test_node: - requires: - - setup - - check_metadata: - requires: - - setup - -jobs: - setup: - <<: *container_config - steps: - - checkout - - run: node -v - - run: npm -v - - run: npm install - - run: - command: | - set +eo - npm ls - true - - persist_to_workspace: - root: ~/ant-design - paths: - - node_modules - - store_artifacts: - path: package-lock.json - - dist: - <<: *container_config - steps: - - checkout - - *attach_workspace - - run: npm run dist - - run: node ./tests/dekko/dist.test.js - - run: npm run bundlesize - - persist_to_workspace: - root: ~/ant-design - paths: - - dist - - compile: - <<: *container_config - steps: - - checkout - - *attach_workspace - - run: npm run compile - - run: node ./tests/dekko/lib.test.js - - persist_to_workspace: - root: ~/ant-design - paths: - - lib - - es - - lint: - <<: *container_config - steps: - - checkout - - *attach_workspace - - run: npm run lint - - test_dist: - <<: *container_config - <<: *react_16 - steps: - - checkout - - *attach_workspace - - run: - command: npm test -- -w 1 - environment: - LIB_DIR: dist - - test_lib: - <<: *container_config - <<: *react_16 - steps: - - checkout - - *attach_workspace - - run: - command: npm test -- -w 1 - environment: - LIB_DIR: lib - - test_es: - <<: *container_config - <<: *react_16 - steps: - - checkout - - *attach_workspace - - run: - command: npm test -- -w 1 - environment: - LIB_DIR: es - - test_dom: - <<: *container_config - <<: *react_16 - steps: - - checkout - - *attach_workspace - - run: npm test -- -w 1 --coverage - - run: bash <(curl -s https://codecov.io/bash) - - test_node: - <<: *container_config - <<: *react_16 - steps: - - checkout - - *attach_workspace - - run: npm run test-node -- -w 1 - - check_metadata: - <<: *container_config - steps: - - checkout - - *attach_workspace - - run: node ./scripts/check-demo.js - -workflows: - version: 2 - build_test: - <<: *workflow - nightly: - <<: *workflow - triggers: - - schedule: - cron: '0 0 * * *' - filters: - branches: - only: - - master diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6fd4c0b80a..0a8c97ff9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,6 +99,9 @@ jobs: - name: check run: node ./tests/dekko/dist.test.js + - name: bundlesize + run: npm run bundlesize + - name: test run: npm test env: @@ -127,6 +130,31 @@ jobs: run: npm run lint needs: setup + dom: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@master + + - name: restore cache from package-lock.json + uses: actions/cache@v2 + with: + path: package-temp-dir + key: lock-${{ github.sha }} + + - name: restore cache from node_modules + uses: actions/cache@v2 + with: + path: node_modules + key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} + + - name: test + run: npm test -- -w 1 --coverage + + - name: coverage + run: bash <(curl -s https://codecov.io/bash) + needs: setup + node: runs-on: ubuntu-latest steps: @@ -146,7 +174,29 @@ jobs: key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - name: test - run: npm test + run: npm run test-node + needs: setup + + check_metadata: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@master + + - name: restore cache from package-lock.json + uses: actions/cache@v2 + with: + path: package-temp-dir + key: lock-${{ github.sha }} + + - name: restore cache from node_modules + uses: actions/cache@v2 + with: + path: node_modules + key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} + + - name: check demo + run: node ./scripts/check-demo.js needs: setup lib: diff --git a/README-pt_BR.md b/README-pt_BR.md index ec246a624b..b5616943b2 100644 --- a/README-pt_BR.md +++ b/README-pt_BR.md @@ -10,7 +10,7 @@ Uma solução empresarial de design e biblioteca UI para React. -[![CircleCI status][circleci-image]][circleci-url] [![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] +[![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] [![david deps][david-image]][david-url] [![david devDeps][david-dev-image]][david-dev-url] [![Total alerts][lgtm-image]][lgtm-url] [![FOSSA Status][fossa-image]][fossa-url] [![Issues need help][help-wanted-image]][help-wanted-url] @@ -18,8 +18,6 @@ Uma solução empresarial de design e biblioteca UI para React. [npm-image]: http://img.shields.io/npm/v/antd.svg?style=flat-square [npm-url]: http://npmjs.org/package/antd -[circleci-image]: https://img.shields.io/travis/com/ant-design/ant-design.svg?style=flat-square -[circleci-url]: https://travis-ci.com/ant-design/ant-design [github-action-image]: https://github.com/ant-design/ant-design/workflows/test/badge.svg [github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3Atest [codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square diff --git a/README-zh_CN.md b/README-zh_CN.md index b6c4e2470a..db54c09758 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -10,7 +10,7 @@ 一套企业级 UI 设计语言和 React 组件库。 -[![CircleCI status][circleci-image]][circleci-url] [![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] +[![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] [![david deps][david-image]][david-url] [![david devDeps][david-dev-image]][david-dev-url] [![Total alerts][lgtm-image]][lgtm-url] [![FOSSA Status][fossa-image]][fossa-url] [![Issues need help][help-wanted-image]][help-wanted-url] @@ -18,8 +18,6 @@ [npm-image]: http://img.shields.io/npm/v/antd.svg?style=flat-square [npm-url]: http://npmjs.org/package/antd -[circleci-image]: https://img.shields.io/circleci/build/github/ant-design/ant-design/master?style=flat-square -[circleci-url]: https://circleci.com/gh/ant-design/ant-design [github-action-image]: https://github.com/ant-design/ant-design/workflows/test/badge.svg [github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3Atest [codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square diff --git a/README.md b/README.md index 26cbbae5b9..a2e7bb1390 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ An enterprise-class UI design language and React UI library. -[![CircleCI status][circleci-image]][circleci-url] [![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] +[![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] [![david deps][david-image]][david-url] [![david devDeps][david-dev-image]][david-dev-url] [![Total alerts][lgtm-image]][lgtm-url] [![FOSSA Status][fossa-image]][fossa-url] [![Issues need help][help-wanted-image]][help-wanted-url] @@ -18,8 +18,6 @@ An enterprise-class UI design language and React UI library. [npm-image]: http://img.shields.io/npm/v/antd.svg?style=flat-square [npm-url]: http://npmjs.org/package/antd -[circleci-image]: https://img.shields.io/circleci/build/github/ant-design/ant-design/master?style=flat-square -[circleci-url]: https://circleci.com/gh/ant-design/ant-design [github-action-image]: https://github.com/ant-design/ant-design/workflows/test/badge.svg [github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3Atest [codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square diff --git a/package.json b/package.json index 0e58c14ae8..44da2c4f1f 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "compile": "antd-tools run compile", "compile:less": "antd-tools run compile:less", "changelog": "node ./scripts/print-changelog", - "predeploy": "antd-tools run clean && npm run site && cp CNAME _site && cp -r .circleci _site && npm run site:test", + "predeploy": "antd-tools run clean && npm run site && cp CNAME _site && cp -r _site && npm run site:test", "deploy": "bisheng gh-pages --push-only --dotfiles", "deploy:china-mirror": "git checkout gh-pages && git pull origin gh-pages && git push git@gitee.com:ant-design/ant-design.git gh-pages", "dist": "antd-tools run dist",