File tree Expand file tree Collapse file tree 2 files changed +45
-16
lines changed Expand file tree Collapse file tree 2 files changed +45
-16
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,28 @@ cache:
2424 directories :
2525 - node_modules
2626before_install :
27- # Skip updating shrinkwrap / lock
28- - " npm config set shrinkwrap false"
29-
27+ # Configure npm
28+ - |
29+ # Skip updating shrinkwrap / lock
30+ npm config set shrinkwrap false
3031 # Remove all non-test dependencies
31- - " npm rm --save-dev connect-redis"
32-
32+ - |
33+ # Remove example dependencies
34+ npm rm --silent --save-dev connect-redis
3335 # Update Node.js modules
34- - " test ! -d node_modules || npm prune"
35- - " test ! -d node_modules || npm rebuild"
36+ - |
37+ # Prune and rebuild node_modules
38+ if [[ -d node_modules ]]; then
39+ npm prune
40+ npm rebuild
41+ fi
3642script :
37- - " npm run test-ci"
38- - " npm run lint"
39- after_script :
" npm install [email protected] && cat ./coverage/lcov.info | coveralls" 43+ # Run test script
44+ - npm run test-ci
45+ # Run linting
46+ - npm run lint
47+ after_script :
48+ - |
49+ # Upload coverage to coveralls
50+ npm install --save-dev [email protected] 51+ coveralls < ./coverage/lcov.info
Original file line number Diff line number Diff line change @@ -13,18 +13,35 @@ environment:
1313cache :
1414 - node_modules
1515install :
16+ # Install Node.js
1617 - ps : >-
1718 try { Install-Product node $env:nodejs_version -ErrorAction Stop }
1819 catch { Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) }
19- - npm config set shrinkwrap false
20- - npm rm --save-dev connect-redis
21- - if exist node_modules npm prune
22- - if exist node_modules npm rebuild
20+ # Configure npm
21+ - ps : |
22+ # Skip updating shrinkwrap / lock
23+ npm config set shrinkwrap false
24+ # Remove all non-test dependencies
25+ - ps : |
26+ # Remove example dependencies
27+ npm rm --silent --save-dev connect-redis
28+ # Update Node.js modules
29+ - ps : |
30+ # Prune & rebuild node_modules
31+ if (Test-Path -Path node_modules) {
32+ npm prune
33+ npm rebuild
34+ }
35+ # Install Node.js modules
2336 - npm install
2437build : off
2538test_script :
26- - node --version
27- - npm --version
39+ # Output version data
40+ - ps : |
41+ node --version
42+ npm --version
43+ # Run test script
2844 - npm run test-ci
45+ # Run linting
2946 - npm run lint
3047version : " {build}"
You can’t perform that action at this time.
0 commit comments