Skip to content

Commit 684c330

Browse files
committed
fix: ci script to run checks
1 parent 7b6cd17 commit 684c330

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/node.js.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,30 @@ jobs:
3737
- name: Type Check
3838
run: npm run check --if-present
3939
- name: Test ES
40-
if: ${{matrix.node-version < 12}}
40+
if: ${{!startsWith(matrix.node-version, '10.')}}
4141
run: npm run test:es --if-present
4242
- name: Test CommonJS
4343
run: npm run test:cjs --if-present
44+
validate-types:
45+
name: Check type use
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Cache node_modules
50+
id: cache-modules
51+
uses: actions/cache@v1
52+
with:
53+
path: node_modules
54+
key: 12.x-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
55+
- name: Install
56+
if: steps.cache-modules.outputs.cache-hit != 'true'
57+
run: npm install
58+
- name: Test Typesript
59+
run: npm run test:types:ts
60+
- name: Test ES
61+
run: npm run test:types:esm
62+
- name: Test CommonJS
63+
run: npm run test:types:cjs
4464
publish:
4565
name: Publish
4666
needs: test

0 commit comments

Comments
 (0)