Skip to content

Commit

Permalink
Add TS typetest matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Feb 12, 2023
1 parent d6121ff commit 7768685
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,35 @@ jobs:

- name: Check build
run: npm run build

test-types:
name: Test Types with TypeScript ${{ matrix.ts }}

needs: [build]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['16.x']
ts: ['4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9.2-rc']
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install TypeScript ${{ matrix.ts }}
run: npm i --save-dev typescript@${{ matrix.ts }}

- name: Test types
run: |
npm run tsc -- --version
npm run check-types
npm run test:types
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"build": "rollup -c",
"prepublishOnly": "npm run clean && npm run check-types && npm run format:check && npm run lint && npm test",
"examples:lint": "eslint --ext js,ts examples",
"examples:test": "cross-env CI=true babel-node examples/testAll.js"
"examples:test": "cross-env CI=true babel-node examples/testAll.js",
"tsc": "tsc"
},
"dependencies": {},
"devDependencies": {
Expand Down

0 comments on commit 7768685

Please sign in to comment.