11name : CI
22
3- on :
4- push :
5- branches : [master]
6- pull_request :
7- branches : [master]
3+ on : ['push', 'pull_request']
84
95jobs :
106 setup :
117 runs-on : ubuntu-latest
128 steps :
139 - name : checkout
14- uses : actions/checkout@master
10+ uses : actions/checkout@v4
1511
16- - uses : actions/setup-node@v1
12+ - uses : actions/setup-node@v4
1713 with :
18- node-version : ' 18 '
14+ node-version : ' 20 '
1915
2016 - name : cache package-lock.json
21- uses : actions/cache@v2
17+ uses : actions/cache@v4
2218 with :
2319 path : package-temp-dir
2420 key : lock-${{ github.sha }}
3531
3632 - name : cache node_modules
3733 id : node_modules_cache_id
38- uses : actions/cache@v2
34+ uses : actions/cache@v4
3935 with :
4036 path : node_modules
4137 key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -48,16 +44,16 @@ jobs:
4844 runs-on : ubuntu-latest
4945 steps :
5046 - name : checkout
51- uses : actions/checkout@master
47+ uses : actions/checkout@v4
5248
5349 - name : restore cache from package-lock.json
54- uses : actions/cache@v2
50+ uses : actions/cache@v4
5551 with :
5652 path : package-temp-dir
5753 key : lock-${{ github.sha }}
5854
5955 - name : restore cache from node_modules
60- uses : actions/cache@v2
56+ uses : actions/cache@v4
6157 with :
6258 path : node_modules
6359 key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -71,16 +67,16 @@ jobs:
7167 runs-on : ubuntu-latest
7268 steps :
7369 - name : checkout
74- uses : actions/checkout@master
70+ uses : actions/checkout@v4
7571
7672 - name : restore cache from package-lock.json
77- uses : actions/cache@v2
73+ uses : actions/cache@v4
7874 with :
7975 path : package-temp-dir
8076 key : lock-${{ github.sha }}
8177
8278 - name : restore cache from node_modules
83- uses : actions/cache@v2
79+ uses : actions/cache@v4
8480 with :
8581 path : node_modules
8682 key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -94,21 +90,26 @@ jobs:
9490 runs-on : ubuntu-latest
9591 steps :
9692 - name : checkout
97- uses : actions/checkout@master
93+ uses : actions/checkout@v4
9894
9995 - name : restore cache from package-lock.json
100- uses : actions/cache@v2
96+ uses : actions/cache@v4
10197 with :
10298 path : package-temp-dir
10399 key : lock-${{ github.sha }}
104100
105101 - name : restore cache from node_modules
106- uses : actions/cache@v2
102+ uses : actions/cache@v4
107103 with :
108104 path : node_modules
109105 key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
110106
111107 - name : coverage
112- run : npm test -- --coverage && bash <(curl -s https://codecov.io/bash)
108+ run : npm test -- --coverage
109+
110+ - name : Upload coverage to Codecov
111+ uses : codecov/codecov-action@v4
112+ with :
113+ token : ${{ secrets.CODECOV_TOKEN }}
113114
114115 needs : setup
0 commit comments