Skip to content

Commit

Permalink
Run type tests against different versions of ESLint and TS during CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Nov 20, 2024
1 parent 8683642 commit a2dd459
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,49 @@ jobs:
- name: ▶️ Run test:types script
run: npm run test:types

type-tests:
name: 🧪 Type tests with ESLint ${{ matrix.eslint }} and TypeScript ${{ matrix.ts }}
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
eslint: [8, 9]
ts: [5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6]

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: 📥 Install dependencies
run: npm install

- name: Pack the package
id: pack
run: npm install "$(npm pack | tail -n1)"

- name: 📥 Uninstall @types/eslint
if: matrix.eslint != 8
run: npm uninstall @types/eslint

- name: 📥 Install ESLint version ${{ matrix.eslint }}
run: npm install --save-dev eslint@${{ matrix.eslint }}

- name: 📥 Install TypeScript version ${{ matrix.ts }}
run: npm install --save-dev typescript@${{ matrix.ts }} -f

- name: ▶️ Run test:types script
run: npm run test:types

- name: 📝 List version of ESLint
run: npm why eslint @types/eslint

release:
name: 🚀 Release
needs: [ lint, test ]
Expand Down

0 comments on commit a2dd459

Please sign in to comment.