Skip to content

Commit 5b68e0e

Browse files
committed
Try adding TS type test matrix
1 parent c526e3b commit 5b68e0e

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,57 @@ jobs:
3535

3636
- name: Collect coverage
3737
run: yarn coverage
38+
39+
test-types:
40+
name: Test Types with TypeScript ${{ matrix.ts }}
41+
42+
needs: [build]
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
node: ['14.x']
48+
ts: ['3.9', '4.0', '4.1', '4.2', '4.3', 'next']
49+
steps:
50+
- name: Checkout repo
51+
uses: actions/checkout@v2
52+
53+
- name: Use node ${{ matrix.node }}
54+
uses: actions/setup-node@v1
55+
with:
56+
node-version: ${{ matrix.node }}
57+
58+
- uses: actions/cache@v2
59+
with:
60+
path: .yarn/cache
61+
key: yarn-${{ hashFiles('yarn.lock') }}
62+
restore-keys: yarn-
63+
64+
- name: Install deps
65+
run: yarn install
66+
67+
- name: Install TypeScript ${{ matrix.ts }}
68+
run: yarn add typescript@${{ matrix.ts }}
69+
70+
# - uses: actions/download-artifact@v2
71+
# with:
72+
# name: package
73+
# path: packages/toolkit
74+
75+
# - name: Install build artifact
76+
# run: yarn add ./package.tgz
77+
78+
# - run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./jest.config.js ./src/tests/*.* ./src/query/tests/*.*
79+
80+
# - name: "@ts-ignore stuff that didn't exist pre-4.1 in the tests"
81+
# if: ${{ matrix.ts < 4.1 }}
82+
# run: sed -i -e 's/@pre41-ts-ignore/@ts-ignore/' -e '/pre41-remove-start/,/pre41-remove-end/d' ./src/tests/*.* ./src/query/tests/*.ts*
83+
84+
# - name: 'disable strictOptionalProperties'
85+
# if: ${{ matrix.ts == 'next' }}
86+
# run: sed -i -e 's|//\(.*strictOptionalProperties.*\)$|\1|' tsconfig.base.json
87+
88+
- name: Test types
89+
run: |
90+
yarn tsc --version
91+
yarn type-tests

0 commit comments

Comments
 (0)