Skip to content

Commit fa69e03

Browse files
committed
CI: no need to install commitlint in TS build
However, we still need to install the types lib, otherwise we would get this compiler error: ``` commitlint.config.ts(3,36): error TS2307: Cannot find module '@commitlint/types' or its corresponding type declarations. ```
1 parent 748d577 commit fa69e03

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/CI.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,17 @@ jobs:
8787
git --version
8888
node --version
8989
npm --version
90-
- name: Install commitlint
91-
run: |
92-
npm install conventional-changelog-conventionalcommits commitlint@latest
9390
- name: Install yarn
9491
run: |
9592
npm install --global yarn
9693
yarn add --dev jest typescript ts-jest @types/jest
94+
- name: Install commitlint dependencies
95+
run: npm install @commitlint/types
9796
- name: Print versions
9897
run: |
9998
git --version
10099
node --version
101100
npm --version
102-
npx commitlint --version
103101
- name: Run typescript compiler
104102
run: npx tsc
105103

@@ -119,23 +117,25 @@ jobs:
119117
sudo apt install --yes --no-install-recommends git ca-certificates
120118
121119
sudo apt install --yes --no-install-recommends npm curl
122-
- name: Install commitlint
123-
run: |
124-
npm install conventional-changelog-conventionalcommits commitlint@latest
125120
- name: Install yarn
126121
run: |
127122
npm install --global yarn
128123
yarn add --dev jest typescript ts-jest @types/jest ts-node
124+
- name: Install commitlint dependencies
125+
run: npm install @commitlint/types
129126
- name: Run typescript compiler
130127
run: npx tsc
131128
- name: Print versions
132129
run: |
133130
git --version
134131
node --version
135132
npm --version
136-
npx commitlint --version
137133
yarn --version
138134
npx tsc --version
135+
- name: Install commitlint
136+
run: |
137+
npm install conventional-changelog-conventionalcommits commitlint@latest
138+
./node_modules/commitlint/cli.js --version
139139
- name: Run tests to validate our plugins
140140
run: yarn jest --config jest.config.ts
141141

0 commit comments

Comments
 (0)