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 : ' 12 '
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 }}
2521
2622 - name : create package-lock.json
27- run : npm i --package-lock-only
23+ run : npm i --package-lock-only --ignore-scripts
2824
2925 - name : hack for singe file
3026 run : |
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,42 +44,39 @@ 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') }}
6460
6561 - name : lint
6662 run : npm run lint
6763
68- - name : type:check
69- run : npm run type:check
70-
7164 needs : setup
7265
7366 compile :
7467 runs-on : ubuntu-latest
7568 steps :
7669 - name : checkout
77- uses : actions/checkout@master
70+ uses : actions/checkout@v4
7871
7972 - name : restore cache from package-lock.json
80- uses : actions/cache@v2
73+ uses : actions/cache@v4
8174 with :
8275 path : package-temp-dir
8376 key : lock-${{ github.sha }}
8477
8578 - name : restore cache from node_modules
86- uses : actions/cache@v2
79+ uses : actions/cache@v4
8780 with :
8881 path : node_modules
8982 key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -97,21 +90,26 @@ jobs:
9790 runs-on : ubuntu-latest
9891 steps :
9992 - name : checkout
100- uses : actions/checkout@master
93+ uses : actions/checkout@v4
10194
10295 - name : restore cache from package-lock.json
103- uses : actions/cache@v2
96+ uses : actions/cache@v4
10497 with :
10598 path : package-temp-dir
10699 key : lock-${{ github.sha }}
107100
108101 - name : restore cache from node_modules
109- uses : actions/cache@v2
102+ uses : actions/cache@v4
110103 with :
111104 path : node_modules
112105 key : node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
113106
114107 - name : coverage
115- 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 }}
116114
117115 needs : setup
0 commit comments