ci: pr title lint job does not need to install all dependencies (#5124)

This commit is contained in:
LongYinan 2023-11-29 09:51:14 +00:00
parent 89f267a3fe
commit a2b8a073cc
No known key found for this signature in database
GPG Key ID: 30B1140CE1C07C99
5 changed files with 41 additions and 3 deletions

View File

@ -19,7 +19,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
uses: actions/setup-node@v3
with:
electron-install: false
- run: echo "${{ github.event.pull_request.title }}" | yarn dlx commitlint -g ./.commitlintrc.json
cache: 'yarn'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn workspaces focus @affine/commitlint-config
- run: echo "${{ github.event.pull_request.title }}" | yarn workspace @affine/commitlint-config commitlint -g ./.commitlintrc.json

View File

@ -0,0 +1,3 @@
# commitlint
This package defines commitlint and it's dependencies, so that it can be used in a CI pipeline to minimize the installation time.

View File

@ -0,0 +1,10 @@
{
"name": "@affine/commitlint-config",
"version": "0.0.0",
"private": true,
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"commitlint": "^18.4.3"
}
}

View File

@ -204,6 +204,16 @@ __metadata:
languageName: unknown
linkType: soft
"@affine/commitlint-config@workspace:tools/commitlint":
version: 0.0.0-use.local
resolution: "@affine/commitlint-config@workspace:tools/commitlint"
dependencies:
"@commitlint/cli": "npm:^18.4.3"
"@commitlint/config-conventional": "npm:^18.4.3"
commitlint: "npm:^18.4.3"
languageName: unknown
linkType: soft
"@affine/component@workspace:*, @affine/component@workspace:packages/frontend/component":
version: 0.0.0-use.local
resolution: "@affine/component@workspace:packages/frontend/component"
@ -17671,6 +17681,18 @@ __metadata:
languageName: node
linkType: hard
"commitlint@npm:^18.4.3":
version: 18.4.3
resolution: "commitlint@npm:18.4.3"
dependencies:
"@commitlint/cli": "npm:^18.4.3"
"@commitlint/types": "npm:^18.4.3"
bin:
commitlint: cli.js
checksum: e37da4f1cd218381a7810b2e74a553bd05b01776d76dc3038b6e805ea6640308dfa0372c2a976ab5d8c34577128fe6df945e4718c27732dd0d79b517f066fee5
languageName: node
linkType: hard
"common-path-prefix@npm:^3.0.0":
version: 3.0.0
resolution: "common-path-prefix@npm:3.0.0"