@@ -13,18 +13,18 @@ jobs:
13
13
- name : checkout
14
14
uses : actions/checkout@master
15
15
16
- - uses : actions/setup-node@v1
16
+ - uses : actions/setup-node@v4
17
17
with :
18
- node-version : ' 16 '
18
+ node-version : ' 20 '
19
19
20
20
- name : cache package-lock.json
21
- uses : actions/cache@v2
21
+ uses : actions/cache@v4
22
22
with :
23
23
path : package-temp-dir
24
24
key : lock-${{ github.sha }}
25
25
26
26
- name : create package-lock.json
27
- run : npm i --package-lock-only
27
+ run : npm i --package-lock-only --legacy-peer-deps
28
28
29
29
- name : hack for singe file
30
30
run : |
34
34
cp package-lock.json package-temp-dir
35
35
- name : cache node_modules
36
36
id : node_modules_cache_id
37
- uses : actions/cache@v2
37
+ uses : actions/cache@v4
38
38
with :
39
39
path : node_modules
40
40
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -47,16 +47,16 @@ jobs:
47
47
runs-on : ubuntu-latest
48
48
steps :
49
49
- name : checkout
50
- uses : actions/checkout@master
50
+ uses : actions/checkout@v4
51
51
52
52
- name : restore cache from package-lock.json
53
- uses : actions/cache@v2
53
+ uses : actions/cache@v4
54
54
with :
55
55
path : package-temp-dir
56
56
key : lock-${{ github.sha }}
57
57
58
58
- name : restore cache from node_modules
59
- uses : actions/cache@v2
59
+ uses : actions/cache@v4
60
60
with :
61
61
path : node_modules
62
62
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -70,16 +70,16 @@ jobs:
70
70
runs-on : ubuntu-latest
71
71
steps :
72
72
- name : checkout
73
- uses : actions/checkout@master
73
+ uses : actions/checkout@v4
74
74
75
75
- name : restore cache from package-lock.json
76
- uses : actions/cache@v2
76
+ uses : actions/cache@v4
77
77
with :
78
78
path : package-temp-dir
79
79
key : lock-${{ github.sha }}
80
80
81
81
- name : restore cache from node_modules
82
- uses : actions/cache@v2
82
+ uses : actions/cache@v4
83
83
with :
84
84
path : node_modules
85
85
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -93,21 +93,26 @@ jobs:
93
93
runs-on : ubuntu-latest
94
94
steps :
95
95
- name : checkout
96
- uses : actions/checkout@master
96
+ uses : actions/checkout@v4
97
97
98
98
- name : restore cache from package-lock.json
99
- uses : actions/cache@v2
99
+ uses : actions/cache@v4
100
100
with :
101
101
path : package-temp-dir
102
102
key : lock-${{ github.sha }}
103
103
104
104
- name : restore cache from node_modules
105
- uses : actions/cache@v2
105
+ uses : actions/cache@v4
106
106
with :
107
107
path : node_modules
108
108
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
109
109
110
110
- name : coverage
111
- run : npm test -- --coverage && bash <(curl -s https://codecov.io/bash)
111
+ run : npm test -- --coverage
112
+
113
+ - uses : codecov/codecov-action@v4
114
+ with :
115
+ fail_ci_if_error : true # optional (default = false)
116
+ token : ${{ secrets.CODECOV_TOKEN }} # required
112
117
113
118
needs : setup
0 commit comments