From 92cdf3c6f2fc0d4f4f537a66e41a984743260bc8 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sat, 19 Aug 2023 13:47:15 +0800 Subject: [PATCH 1/5] ci: only use GH actions, ditch circleci --- .circleci/config.yml | 109 ------------------------------------------- README.md | 31 ++++++------ docs/README.md | 13 ++---- 3 files changed, 17 insertions(+), 136 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6e0e5d322f..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,109 +0,0 @@ -version: 2.1 - -orbs: - win: circleci/windows@4.1.1 - -commands: - update-yarn: - steps: - - run: - name: Node version - command: node -v - - run: - name: Update yarn - command: yarn global add yarn@latest - install: - steps: - - run: - name: Install dependencies - command: yarn install --ignore-engines --frozen-lockfile - audit: - steps: - - run: - name: Audit dependencies - command: yarn audit - build: - steps: - - run: - name: Build packages - command: yarn build - lint: - steps: - - run: - name: Lint project - command: yarn lint - format: - steps: - - run: - name: Format project - command: yarn format - deps: - steps: - - run: - name: Check dependencies - command: yarn deps - test: - steps: - - run: - name: Test - command: yarn test-ci - save-cache: - steps: - - save_cache: - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - run-all: - steps: - - checkout - - restore_cache: - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - - update-yarn - - install - - save-cache - - build - - lint - - format - - deps - - test - run-tests: - steps: - - checkout - - restore_cache: - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - - update-yarn - - install - - save-cache - - build - - test -jobs: - v14: - docker: - - image: node:14-buster - steps: - - run-tests - v16: - docker: - - image: node:16-buster - steps: - - run-tests - v18: - docker: - - image: node:18-buster - steps: - - run-tests - windows: - executor: - name: win/default - steps: - - run-tests - -workflows: - node: - jobs: - - v14 - - v16 - - v18 - - windows diff --git a/README.md b/README.md index de8958b03a..6df5cf2f7f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ > > `cat docs/assets/commitlint.json | svg-term --out docs/assets/commitlint.svg --frame --profile=Seti --height=20 --width=80` -[![npm latest][2]][3] [![CircleCI][4]][5] +[![npm latest][2]][3] [![Github Acrions][4]] - 🚓 Be a good `commitizen` - 📦 Share configuration via `npm` @@ -113,13 +113,13 @@ yarn husky install npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}' ``` -**Or use installed package instead** +**Or use installed package instead** + ``` npm pkg set scripts.commitlint="commitlint --edit" npx husky add .husky/commit-msg 'npm run commitlint ${1}' ``` - Check the [husky documentation](https://typicode.github.io/husky/#/?id=manual) on how you can automatically have Git hooks enabled after install for different `yarn` versions. **Detailed Setup instructions** @@ -214,15 +214,15 @@ is room and need for improvement. The items on the roadmap should enhance `commi Security patches will be applied to versions which are not yet EOL.\ Features will only be applied to the current main version. -| Release | Inital release | End-of-life | | -| -------------------------------------------------------------------------------- | -------------- | ----------- |-----| -| [v17](https://github.com/conventional-changelog/commitlint/releases/tag/v17.0.0) | 16.05.2022 | 16.05.2023 |(till next main version)| -| [v16](https://github.com/conventional-changelog/commitlint/releases/tag/v16.0.0) | 26.12.2021 | 26.12.2022 || -| [v15](https://github.com/conventional-changelog/commitlint/releases/tag/v15.0.0) | 17.11.2021 | 17.11.2022 || -| [v14](https://github.com/conventional-changelog/commitlint/releases/tag/v14.0.0) | 26.10.2021 | 26.10.2022 || -| [v13](https://github.com/conventional-changelog/commitlint/releases/tag/v13.0.0) | 24.05.2021 | 24.05.2022 || -| [v12](https://github.com/conventional-changelog/commitlint/releases/tag/v12.0.0) | 23.02.2021 | 23.02.2022 || -| [v11](https://github.com/conventional-changelog/commitlint/releases/tag/v11.0.0) | 13.09.2020 | 13.09.2020 || +| Release | Inital release | End-of-life | | +| -------------------------------------------------------------------------------- | -------------- | ----------- | ------------------------ | +| [v17](https://github.com/conventional-changelog/commitlint/releases/tag/v17.0.0) | 16.05.2022 | 16.05.2023 | (till next main version) | +| [v16](https://github.com/conventional-changelog/commitlint/releases/tag/v16.0.0) | 26.12.2021 | 26.12.2022 | | +| [v15](https://github.com/conventional-changelog/commitlint/releases/tag/v15.0.0) | 17.11.2021 | 17.11.2022 | | +| [v14](https://github.com/conventional-changelog/commitlint/releases/tag/v14.0.0) | 26.10.2021 | 26.10.2022 | | +| [v13](https://github.com/conventional-changelog/commitlint/releases/tag/v13.0.0) | 24.05.2021 | 24.05.2022 | | +| [v12](https://github.com/conventional-changelog/commitlint/releases/tag/v12.0.0) | 23.02.2021 | 23.02.2022 | | +| [v11](https://github.com/conventional-changelog/commitlint/releases/tag/v11.0.0) | 13.09.2020 | 13.09.2020 | | _Dates are subject to change._ @@ -349,12 +349,7 @@ npx lerna exec --no-bail --no-private --no-sort --stream -- '[ -n "$(npm v . dis [1]: https://nodejs.org/api/documentation.html#documentation_stability_index [2]: https://img.shields.io/npm/v/@commitlint/cli.svg?style=flat-square [3]: https://npmjs.org/package/@commitlint/cli -[4]: https://img.shields.io/circleci/project/github/conventional-changelog/commitlint/master.svg?style=flat-square -[5]: https://circleci.com/gh/conventional-changelog/commitlint - - - +[4]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml/badge.svg [8]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square [9]: https://nodejs.org/api/documentation.html#documentation_stability_index [10]: https://img.shields.io/npm/v/@commitlint/cli/next.svg?style=flat-square diff --git a/docs/README.md b/docs/README.md index 7893699a25..aed2698be8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@ # commitlint   [![slack][11]][12] -[![npm latest][2]][3] [![CircleCI][4]][5] +[![npm latest][2]][3] [![Github Acrions][4]] `commitlint` helps your team adhere to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy. @@ -61,14 +61,9 @@ commitlint --from=HEAD~1 [1]: https://nodejs.org/api/documentation.html#documentation_stability_index [2]: https://img.shields.io/npm/v/@commitlint/cli.svg?style=flat-square [3]: https://npmjs.org/package/@commitlint/cli -[4]: https://img.shields.io/circleci/project/github/conventional-changelog/commitlint/master.svg?style=flat-square -[5]: https://circleci.com/gh/conventional-changelog/commitlint - - - +[4]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml/badge.svg [8]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square [9]: https://nodejs.org/api/documentation.html#documentation_stability_index [10]: https://img.shields.io/npm/v/@commitlint/cli/next.svg?style=flat-square -[11]: http://devtoolscommunity.herokuapp.com/badge.svg?style=flat-square -[12]: http://devtoolscommunity.herokuapp.com +[11]: https://devtoolscommunity.herokuapp.com/badge.svg?style=flat-square +[12]: https://devtoolscommunity.herokuapp.com From 28b50057bc76a5e79bfc6d5f1eca0c6bec9c46a3 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sat, 19 Aug 2023 14:01:44 +0800 Subject: [PATCH 2/5] ci: specify when to run GH actions --- .github/workflows/CI.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 94c5ffe771..de76abd78c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,11 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize] jobs: v14: From fad50bbca9c8d5dab49564bc7381755fc616497a Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sat, 19 Aug 2023 14:14:15 +0800 Subject: [PATCH 3/5] docs: update GH actions badge --- README.md | 3 ++- docs/README.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6df5cf2f7f..05f5c851a7 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ > > `cat docs/assets/commitlint.json | svg-term --out docs/assets/commitlint.svg --frame --profile=Seti --height=20 --width=80` -[![npm latest][2]][3] [![Github Acrions][4]] +[![npm latest][2]][3] [![Github Actions][4]][5] - 🚓 Be a good `commitizen` - 📦 Share configuration via `npm` @@ -350,6 +350,7 @@ npx lerna exec --no-bail --no-private --no-sort --stream -- '[ -n "$(npm v . dis [2]: https://img.shields.io/npm/v/@commitlint/cli.svg?style=flat-square [3]: https://npmjs.org/package/@commitlint/cli [4]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml/badge.svg +[5]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml [8]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square [9]: https://nodejs.org/api/documentation.html#documentation_stability_index [10]: https://img.shields.io/npm/v/@commitlint/cli/next.svg?style=flat-square diff --git a/docs/README.md b/docs/README.md index aed2698be8..58b572c9a7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@ # commitlint   [![slack][11]][12] -[![npm latest][2]][3] [![Github Acrions][4]] +[![npm latest][2]][3] [![Github Actions][4]][5] `commitlint` helps your team adhere to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy. @@ -62,6 +62,7 @@ commitlint --from=HEAD~1 [2]: https://img.shields.io/npm/v/@commitlint/cli.svg?style=flat-square [3]: https://npmjs.org/package/@commitlint/cli [4]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml/badge.svg +[5]: https://github.com/conventional-changelog/commitlint/actions/workflows/CI.yml [8]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square [9]: https://nodejs.org/api/documentation.html#documentation_stability_index [10]: https://img.shields.io/npm/v/@commitlint/cli/next.svg?style=flat-square From a47ee8cd5c567c9cefae0b57e9e3c373a647071d Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sat, 19 Aug 2023 14:23:05 +0800 Subject: [PATCH 4/5] chore: trigger actions From a115f059dd62b5d0ffee6471ac77126608e9b8e8 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sat, 19 Aug 2023 14:36:18 +0800 Subject: [PATCH 5/5] ci: try windows test action for 3 times --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index de76abd78c..22fbee4409 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -128,6 +128,8 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v3 + with: + max_attempts: 3 - name: Update yarn run: | node --version