File tree 1 file changed +27
-11
lines changed
1 file changed +27
-11
lines changed Original file line number Diff line number Diff line change 7
7
- ' **/tsconfig.json'
8
8
- ' tests/**/*.ts'
9
9
- ' src/**/*.ts'
10
- - ' jest.config.js '
10
+ - ' jest.config.ts '
11
11
- ' package-lock.json'
12
12
branches :
13
13
- main
14
14
- ' release/*'
15
15
16
16
jobs :
17
- jest :
18
- timeout-minutes : 10
17
+ setup-test :
19
18
if : github.event.pull_request.draft == false
20
19
runs-on : ubuntu-latest
21
- strategy :
22
- matrix :
23
- # current and active LTS
24
- node : [ 18, 19 ]
25
20
concurrency :
26
21
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27
22
cancel-in-progress : true
28
23
steps :
29
24
- uses : actions/checkout@v3
25
+
26
+ - name : Install dependencies
27
+ run : npm ci --ignore-scripts
28
+ jest-browser :
29
+ needs : setup-test
30
+ timeout-minutes : 10
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - uses : actions/setup-node@v3
34
+ with :
35
+ cache : ' npm'
36
+ node-version : ' latest'
37
+ - name : Run tests on jsdom
38
+ run : jest --selectProjects=jsdom
39
+ jest-node :
40
+ needs : setup-test
41
+ timeout-minutes : 10
42
+ runs-on : ubuntu-latest
43
+ strategy :
44
+ matrix :
45
+ # current and active LTS
46
+ node : [ 18, 19 ]
47
+ steps :
30
48
- uses : actions/setup-node@v3
31
49
with :
32
50
cache : ' npm'
33
51
node-version : ${{ matrix.node }}
34
- - name : Install dependencies
35
- run : npm ci --ignore-scripts
36
- - name : Run tests
37
- run : npm run test
52
+ - name : Run tests on node v${{ matrix.node }}
53
+ run : jest --selectProjects=node
You can’t perform that action at this time.
0 commit comments