@@ -2,23 +2,23 @@ name: CI
2
2
3
3
on :
4
4
push :
5
- branches : [master]
5
+ branches : [ master ]
6
6
pull_request :
7
- branches : [master]
7
+ branches : [ master ]
8
8
9
9
jobs :
10
10
setup :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
13
- name : checkout
14
- uses : actions/checkout@master
14
+ uses : actions/checkout@v4
15
15
16
- - uses : actions/setup-node@v1
16
+ - uses : actions/setup-node@v4
17
17
with :
18
- node-version : ' 18 '
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 }}
35
35
36
36
- name : cache node_modules
37
37
id : node_modules_cache_id
38
- uses : actions/cache@v2
38
+ uses : actions/cache@v4
39
39
with :
40
40
path : node_modules
41
41
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -48,16 +48,16 @@ jobs:
48
48
runs-on : ubuntu-latest
49
49
steps :
50
50
- name : checkout
51
- uses : actions/checkout@master
51
+ uses : actions/checkout@v4
52
52
53
53
- name : restore cache from package-lock.json
54
- uses : actions/cache@v2
54
+ uses : actions/cache@v4
55
55
with :
56
56
path : package-temp-dir
57
57
key : lock-${{ github.sha }}
58
58
59
59
- name : restore cache from node_modules
60
- uses : actions/cache@v2
60
+ uses : actions/cache@v4
61
61
with :
62
62
path : node_modules
63
63
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -67,23 +67,22 @@ jobs:
67
67
68
68
- name : ts check
69
69
run : npm run tsc
70
-
71
70
needs : setup
72
-
71
+
73
72
compile :
74
73
runs-on : ubuntu-latest
75
74
steps :
76
75
- name : checkout
77
- uses : actions/checkout@master
76
+ uses : actions/checkout@v4
78
77
79
78
- name : restore cache from package-lock.json
80
- uses : actions/cache@v2
79
+ uses : actions/cache@v4
81
80
with :
82
81
path : package-temp-dir
83
82
key : lock-${{ github.sha }}
84
83
85
84
- name : restore cache from node_modules
86
- uses : actions/cache@v2
85
+ uses : actions/cache@v4
87
86
with :
88
87
path : node_modules
89
88
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -92,26 +91,31 @@ jobs:
92
91
run : npm run compile
93
92
94
93
needs : setup
95
-
94
+
96
95
coverage :
97
96
runs-on : ubuntu-latest
98
97
steps :
99
98
- name : checkout
100
- uses : actions/checkout@master
99
+ uses : actions/checkout@v4
101
100
102
101
- name : restore cache from package-lock.json
103
- uses : actions/cache@v2
102
+ uses : actions/cache@v4
104
103
with :
105
104
path : package-temp-dir
106
105
key : lock-${{ github.sha }}
107
106
108
107
- name : restore cache from node_modules
109
- uses : actions/cache@v2
108
+ uses : actions/cache@v4
110
109
with :
111
110
path : node_modules
112
111
key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
113
112
114
113
- name : coverage
115
- run : npm test -- --coverage && bash <(curl -s https://codecov.io/bash)
114
+ run : npm test -- --coverage
115
+
116
+ - name : Upload coverage to Codecov
117
+ uses : codecov/codecov-action@v4
118
+ with :
119
+ token : ${{ secrets.CODECOV_TOKEN }}
116
120
117
121
needs : setup
0 commit comments