@@ -15,41 +15,43 @@ jobs:
15
15
16
16
- uses : actions/setup-node@v1
17
17
with :
18
- node-version : ' 12 '
18
+ node-version : ' 18 '
19
19
20
- - name : cache package -lock.json
20
+ - name : cache pnpm -lock.yaml
21
21
uses : actions/cache@v2
22
22
with :
23
23
path : package-temp-dir
24
24
key : lock-${{ github.sha }}
25
25
26
- - name : create package-lock.json
27
- run : npm i --package-lock-only
26
+ - name : create pnpm-lock.yaml
27
+ run : |
28
+ npm install --global pnpm@7
29
+ pnpm config set store-dir .pnpm-store
28
30
29
31
- name : hack for singe file
30
32
run : |
31
33
if [ ! -d "package-temp-dir" ]; then
32
34
mkdir package-temp-dir
33
35
fi
34
- cp package -lock.json package-temp-dir
36
+ cp pnpm -lock.yaml package-temp-dir
35
37
- name : cache node_modules
36
38
id : node_modules_cache_id
37
39
uses : actions/cache@v2
38
40
with :
39
41
path : node_modules
40
- key : node_modules-${{ hashFiles('**/package-temp-dir/package -lock.json ') }}
42
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm -lock.yaml ') }}
41
43
42
44
- name : install
43
45
if : steps.node_modules_cache_id.outputs.cache-hit != 'true'
44
- run : npm ci
46
+ run : pnpm install
45
47
46
48
lint :
47
49
runs-on : ubuntu-latest
48
50
steps :
49
51
- name : checkout
50
52
uses : actions/checkout@master
51
53
52
- - name : restore cache from package -lock.json
54
+ - name : restore cache from pnpm -lock.yaml
53
55
uses : actions/cache@v2
54
56
with :
55
57
path : package-temp-dir
@@ -59,10 +61,10 @@ jobs:
59
61
uses : actions/cache@v2
60
62
with :
61
63
path : node_modules
62
- key : node_modules-${{ hashFiles('**/package-temp-dir/package -lock.json ') }}
64
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm -lock.yaml ') }}
63
65
64
66
- name : lint
65
- run : npm run lint
67
+ run : pnpm lint
66
68
67
69
needs : setup
68
70
72
74
- name : checkout
73
75
uses : actions/checkout@master
74
76
75
- - name : restore cache from package -lock.json
77
+ - name : restore cache from pnpm -lock.yaml
76
78
uses : actions/cache@v2
77
79
with :
78
80
path : package-temp-dir
@@ -82,10 +84,10 @@ jobs:
82
84
uses : actions/cache@v2
83
85
with :
84
86
path : node_modules
85
- key : node_modules-${{ hashFiles('**/package-temp-dir/package -lock.json ') }}
87
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm -lock.yaml ') }}
86
88
87
89
- name : compile
88
- run : npm run compile
90
+ run : pnpm compile
89
91
90
92
needs : setup
91
93
95
97
- name : checkout
96
98
uses : actions/checkout@master
97
99
98
- - name : restore cache from package -lock.json
100
+ - name : restore cache from pnpm -lock.yaml
99
101
uses : actions/cache@v2
100
102
with :
101
103
path : package-temp-dir
@@ -105,9 +107,9 @@ jobs:
105
107
uses : actions/cache@v2
106
108
with :
107
109
path : node_modules
108
- key : node_modules-${{ hashFiles('**/package-temp-dir/package -lock.json ') }}
110
+ key : node_modules-${{ hashFiles('**/package-temp-dir/pnpm -lock.yaml ') }}
109
111
110
112
- name : coverage
111
- run : npm test -- -- coverage && bash <(curl -s https://codecov.io/bash)
113
+ run : pnpm test: coverage && bash <(curl -s https://codecov.io/bash)
112
114
113
115
needs : setup
0 commit comments