Skip to content

Commit d883fe9

Browse files
committed
chore: use matrix to parallelize target based test
1 parent 684c330 commit d883fe9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/node.js.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
validate-types:
4545
name: Check type use
4646
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
test-package: ['ts', 'esm', 'cjs']
4750
steps:
4851
- uses: actions/checkout@v2
4952
- name: Cache node_modules
@@ -55,12 +58,8 @@ jobs:
5558
- name: Install
5659
if: steps.cache-modules.outputs.cache-hit != 'true'
5760
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
61+
- name: Test ${{ matrix.test-package }}
62+
run: npm run test:types:${{matrix.test-package}}
6463
publish:
6564
name: Publish
6665
needs: test

0 commit comments

Comments
 (0)