Skip to content

Commit b823f4f

Browse files
committed
matrix testing for node versions
1 parent 87bc4d3 commit b823f4f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/tests.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,24 @@ jobs:
1111
tests:
1212
name: Tests
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
# all LTSes + current
17+
# https://github.com/nodejs/Release#release-schedule
18+
node: [ 14, 16, 18, 19 ]
1419
steps:
1520
- uses: actions/checkout@v3
1621
- uses: actions/setup-node@v3
1722
with:
18-
node-version: '16.x'
23+
node-version: ${{ matrix.node }}
1924
- name: "Run tests"
2025
env:
2126
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
2227
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
28+
# for some reason graphql is not available on node 14 if not explicitly installed
2329
run: |
24-
npm install
30+
npm ci
31+
if ${{ matrix.node == 14 }}; then npm install graphql; fi
2532
ci/run_dependencies.sh
2633
npm test
2734
ci/stop_dependencies.sh
@@ -35,7 +42,8 @@ jobs:
3542
# Setup .npmrc file to publish to npm
3643
- uses: actions/setup-node@v3
3744
with:
38-
node-version: '16.x'
45+
# latest LTS
46+
node-version: 18
3947
registry-url: 'https://registry.npmjs.org'
4048
- run: npm ci && npm run build
4149
- run: npm publish

0 commit comments

Comments
 (0)