77 - ' **/tsconfig.json'
88 - ' tests/**/*.ts'
99 - ' src/**/*.ts'
10- - ' jest.config.ts'
1110 - ' package-lock.json'
1211 branches :
1312 - main
@@ -21,37 +20,54 @@ jobs:
2120 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2221 cancel-in-progress : true
2322 steps :
24- # subsequent calls to this action will use already downloaded code from the workspace
25- - uses : actions/checkout@v3
26- jest-browser :
23+ - uses : actions/checkout@v5
24+ test-browser :
2725 needs : setup-test
2826 timeout-minutes : 10
2927 runs-on : ubuntu-latest
3028 steps :
31- - uses : actions/checkout@v3
32- - uses : actions/setup-node@v3
29+ - uses : actions/checkout@v5
30+ - uses : actions/setup-node@v5
3331 with :
32+ node-version : ' lts/*'
3433 cache : ' npm'
35- node-version : ' latest'
3634 - name : Install dependencies
37- run : npm ci --ignore-scripts
35+ run : npm ci
3836 - name : Run tests on jsdom
39- run : npx jest --selectProjects =jsdom
40- jest -node :
37+ run : npm run test -- --environment =jsdom
38+ test -node :
4139 needs : setup-test
4240 timeout-minutes : 10
4341 runs-on : ubuntu-latest
4442 strategy :
4543 matrix :
46- # current and active LTS
47- node : [ 18, 20 ]
44+ node : ['lts/*', 'current']
45+ fail-fast : false
4846 steps :
49- - uses : actions/checkout@v3
50- - uses : actions/setup-node@v3
47+ - uses : actions/checkout@v5
48+ - uses : actions/setup-node@v5
5149 with :
50+ node-version : ${{ matrix.node }}
5251 cache : ' npm'
52+ - name : Install dependencies
53+ run : npm ci
54+ - name : Run tests on node ${{ matrix.node }}
55+ run : npm run test
56+ test-edge :
57+ needs : setup-test
58+ timeout-minutes : 10
59+ runs-on : ubuntu-latest
60+ strategy :
61+ matrix :
62+ node : ['lts/*', 'current']
63+ fail-fast : false
64+ steps :
65+ - uses : actions/checkout@v5
66+ - uses : actions/setup-node@v5
67+ with :
5368 node-version : ${{ matrix.node }}
69+ cache : ' npm'
5470 - name : Install dependencies
55- run : npm ci --ignore-scripts
56- - name : Run tests on node v ${{ matrix.node }}
57- run : npx jest --selectProjects=node
71+ run : npm ci
72+ - name : Run tests on node ${{ matrix.node }}
73+ run : npm run test -- --environment edge-runtime
0 commit comments