@@ -17,39 +17,36 @@ jobs:
17
17
- name : Checkout code
18
18
uses : actions/checkout@v4
19
19
20
- - name : Cache yarn. lock
20
+ - name : Cache pnpm- lock.yaml
21
21
uses : actions/cache@v4
22
22
with :
23
23
path : package-temp-dir
24
24
key : lock-${{ github.sha }}
25
25
26
- - name : Create yarn.lock
27
- run : yarn generate-lock-entry
28
-
29
26
- name : Hack for single file
30
27
run : |
31
28
if [ ! -d "package-temp-dir" ]; then
32
29
mkdir package-temp-dir
33
30
fi
34
- cp yarn. lock package-temp-dir
31
+ cp pnpm- lock.yaml package-temp-dir
35
32
- name : Cache node_modules
36
33
id : node_modules_cache_id
37
34
uses : actions/cache@v4
38
35
with :
39
36
path : node_modules
40
- key : node_modules-${{ hashFiles('**/package-temp-dir/yarn. lock') }}
37
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm- lock.yaml ') }}
41
38
42
39
- name : Install dependencies
43
40
if : steps.node_modules_cache_id.outputs.cache-hit != 'true'
44
- run : yarn
41
+ run : pnpm install
45
42
46
43
prettier :
47
44
needs : [setup]
48
45
runs-on : ubuntu-latest
49
46
steps :
50
47
- uses : actions/checkout@v2
51
48
52
- - name : Restore cache from yarn. lock
49
+ - name : Restore cache from pnpm- lock.yaml
53
50
uses : actions/cache@v4
54
51
with :
55
52
path : package-temp-dir
@@ -59,18 +56,18 @@ jobs:
59
56
uses : actions/cache@v4
60
57
with :
61
58
path : node_modules
62
- key : node_modules-${{ hashFiles('**/package-temp-dir/yarn. lock') }}
59
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm- lock.yaml ') }}
63
60
64
61
- name : Prettier check
65
- run : yarn prettier
62
+ run : pnpm prettier
66
63
67
64
eslint :
68
65
needs : [setup]
69
66
runs-on : ubuntu-latest
70
67
steps :
71
68
- uses : actions/checkout@v2
72
69
73
- - name : Restore cache from yarn. lock
70
+ - name : Restore cache from pnpm- lock.yaml
74
71
uses : actions/cache@v4
75
72
with :
76
73
path : package-temp-dir
@@ -80,18 +77,18 @@ jobs:
80
77
uses : actions/cache@v4
81
78
with :
82
79
path : node_modules
83
- key : node_modules-${{ hashFiles('**/package-temp-dir/yarn. lock') }}
80
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm- lock.yaml ') }}
84
81
85
82
- name : Eslint check
86
- run : yarn eslint
83
+ run : pnpm eslint
87
84
88
85
test :
89
86
needs : [setup]
90
87
runs-on : ubuntu-latest
91
88
steps :
92
89
- uses : actions/checkout@v2
93
90
94
- - name : Restore cache from yarn. lock
91
+ - name : Restore cache from pnpm- lock.yaml
95
92
uses : actions/cache@v4
96
93
with :
97
94
path : package-temp-dir
@@ -101,23 +98,23 @@ jobs:
101
98
uses : actions/cache@v4
102
99
with :
103
100
path : node_modules
104
- key : node_modules-${{ hashFiles('**/package-temp-dir/yarn. lock') }}
101
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm- lock.yaml ') }}
105
102
106
103
- name : Setup timezone
107
104
uses : zcong1993/setup-timezone@master
108
105
with :
109
106
timezone : Asia/Shanghai
110
107
111
108
- name : Unit Test
112
- run : yarn test
109
+ run : pnpm test
113
110
114
111
build :
115
112
runs-on : ubuntu-latest
116
113
needs : [setup, prettier, eslint, test]
117
114
steps :
118
115
- uses : actions/checkout@v2
119
116
120
- - name : Restore cache from yarn. lock
117
+ - name : Restore cache from pnpm- lock.yaml
121
118
uses : actions/cache@v4
122
119
with :
123
120
path : package-temp-dir
@@ -127,7 +124,7 @@ jobs:
127
124
uses : actions/cache@v4
128
125
with :
129
126
path : node_modules
130
- key : node_modules-${{ hashFiles('**/package-temp-dir/yarn. lock') }}
127
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm- lock.yaml ') }}
131
128
132
129
- name : Build test
133
- run : yarn build
130
+ run : pnpm build
0 commit comments