39
39
run : |
40
40
git config --global core.autocrlf false
41
41
git config --global core.eol lf
42
+ shell : bash
42
43
- if : steps.should_run.outputs.shouldrun == 'true'
43
44
name : Checkout repository
44
- uses : actions/checkout@v3
45
+ uses : actions/checkout@v4
45
46
- if : steps.should_run.outputs.shouldrun == 'true'
46
47
name : Check if Node.js project and has package.json
47
48
id : packagejson
@@ -53,27 +54,26 @@ jobs:
53
54
id : lockversion
54
55
- if : steps.packagejson.outputs.exists == 'true'
55
56
name : Setup Node.js
56
- uses : actions/setup-node@v3
57
+ uses : actions/setup-node@v4
57
58
with :
58
59
node-version : " ${{ steps.lockversion.outputs.version }}"
59
- cache : ' npm'
60
- cache-dependency-path : ' **/package-lock.json'
60
+ - if : steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
61
+ # npm cli 10 is buggy because of some cache issue
62
+ name : Install npm cli 8
63
+ shell : bash
64
+ run :
npm install -g [email protected]
61
65
- if : steps.packagejson.outputs.exists == 'true'
62
66
name : Install dependencies
63
- id : first-installation
67
+ shell : bash
64
68
run : npm ci
65
- continue-on-error : true
66
- - if : steps.first-installation.outcome != 'success' && steps.packagejson.outputs.exists == 'true'
67
- name : Clear NPM cache and install deps again
68
- run : |
69
- npm cache clean --force
70
- npm ci
71
69
- if : steps.packagejson.outputs.exists == 'true'
72
70
name : Test
73
71
run : npm test --if-present
74
- - if : steps.packagejson.outputs.exists == 'true'
72
+ - if : steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest'
73
+ # linting should run just one and not on all possible operating systems
75
74
name : Run linter
76
75
run : npm run lint --if-present
77
76
- if : steps.packagejson.outputs.exists == 'true'
78
77
name : Run release assets generation to make sure PR does not break it
78
+ shell : bash
79
79
run : npm run generate:assets --if-present
0 commit comments