Skip to content

Commit a2dd459

Browse files
committed
Run type tests against different versions of ESLint and TS during CI
1 parent 8683642 commit a2dd459

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,49 @@ jobs:
118118
- name: ▶️ Run test:types script
119119
run: npm run test:types
120120

121+
type-tests:
122+
name: 🧪 Type tests with ESLint ${{ matrix.eslint }} and TypeScript ${{ matrix.ts }}
123+
runs-on: ubuntu-latest
124+
125+
strategy:
126+
fail-fast: false
127+
128+
matrix:
129+
eslint: [8, 9]
130+
ts: [5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6]
131+
132+
steps:
133+
- name: ⬇️ Checkout repo
134+
uses: actions/checkout@v4
135+
136+
- name: ⎔ Setup Node
137+
uses: actions/setup-node@v4
138+
with:
139+
node-version: 18
140+
141+
- name: 📥 Install dependencies
142+
run: npm install
143+
144+
- name: Pack the package
145+
id: pack
146+
run: npm install "$(npm pack | tail -n1)"
147+
148+
- name: 📥 Uninstall @types/eslint
149+
if: matrix.eslint != 8
150+
run: npm uninstall @types/eslint
151+
152+
- name: 📥 Install ESLint version ${{ matrix.eslint }}
153+
run: npm install --save-dev eslint@${{ matrix.eslint }}
154+
155+
- name: 📥 Install TypeScript version ${{ matrix.ts }}
156+
run: npm install --save-dev typescript@${{ matrix.ts }} -f
157+
158+
- name: ▶️ Run test:types script
159+
run: npm run test:types
160+
161+
- name: 📝 List version of ESLint
162+
run: npm why eslint @types/eslint
163+
121164
release:
122165
name: 🚀 Release
123166
needs: [ lint, test ]

0 commit comments

Comments
 (0)