File tree 3 files changed +48
-33
lines changed
3 files changed +48
-33
lines changed Original file line number Diff line number Diff line change 1
- name : CI- Test
1
+ name : Test CI
2
2
3
- env :
4
- NODE_OPTIONS : --max-old-space-size=6144
5
-
6
- on :
7
- push :
8
- paths-ignore :
9
- - ' docs/**'
10
- - ' **/demo/*'
11
- - ' **/*.md'
3
+ on : [push, pull_request]
12
4
13
5
jobs :
14
6
test :
15
- name : " Test"
16
7
runs-on : ubuntu-latest
8
+
9
+ strategy :
10
+ matrix :
11
+ mode : ['normal', 'strict']
12
+
17
13
steps :
18
- - name : Checkout
19
- uses : actions/checkout@v3
20
- with :
21
- fetch-depth : 0
14
+ - uses : actions/checkout@v3
22
15
23
- - name : Setup Node.js
24
- uses : actions/setup-node@v3
16
+ - name : Install pnpm
17
+
25
18
with :
26
- node-version : 14
19
+ version : 7
20
+
21
+ - name : Get pnpm store directory
22
+ id : pnpm-cache
23
+ run : |
24
+ echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
27
25
28
- - name : Cache pnpm modules
26
+ - name : Setup pnpm cache
29
27
uses : actions/cache@v3
30
28
with :
31
- path : ~/ .pnpm-store
32
- key : ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
29
+ path : ${{ steps .pnpm-cache.outputs.pnpm_cache_dir }}
30
+ key : ${{ runner.os }}-pnpm-store- ${{ hashFiles('**/pnpm-lock.yaml') }}
33
31
restore-keys : |
34
- ${{ runner.os }}-
32
+ ${{ runner.os }}-pnpm-store-
35
33
36
- - name : Pnpm action
37
- uses : pnpm/action- setup@v2
34
+ - name : Use Node.js ${{ matrix.node-version }}
35
+ uses : actions/ setup-node@v3
38
36
with :
39
- version : latest
40
- run_install : true
37
+ node-version : ${{ matrix.node-version }}
38
+
39
+ - name : pnpm run intall, build
40
+ run : |
41
+ pnpm run init
41
42
42
- - name : Build
43
- run : pnpm build
43
+ - name : test with react normal mode
44
+ if : ${{ matrix.mode == 'normal' }}
45
+ run : |
46
+ pnpm run test
44
47
45
- - name : " Test"
46
- run : pnpm test
47
- env :
48
- CI : true
49
- NODE_ENV : test
48
+ - name : test with react strict mode
49
+ if : ${{ matrix.mode == 'strict' }}
50
+ run : |
51
+ pnpm run test:strict
Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"scripts" : {
4
+ "init" : " pnpm install && pnpm run build" ,
4
5
"start" : " dumi dev" ,
5
6
"site" : " dumi build" ,
6
7
"build" : " hooks-scripts turbo --cmd build" ,
13
14
"entry" : " walrus entry" ,
14
15
"jest" : " jest" ,
15
16
"test" : " jest" ,
17
+ "test:strict" : " cross-env REACT_MODE=strict jest" ,
16
18
"test:coverage" : " jest --coverage" ,
17
19
"publish" : " redbud run ./scripts/publish.ts" ,
18
20
"release:old" : " lerna exec --concurrency 1 -- npx --no-install semantic-release -e semantic-release-monorepo" ,
87
89
"@walrus/package" : " ^1.1.0" ,
88
90
"@walrus/plugin-release" : " 1.14.3" ,
89
91
"antd" : " 5.1.1" ,
92
+ "cross-env" : " 7.0.3" ,
90
93
"conventional-changelog-cli" : " 2.2.2" ,
91
94
"conventional-changelog-gitmoji-config" : " 1.4.4" ,
92
95
"dumi" : " 2.0.17" ,
You can’t perform that action at this time.
0 commit comments