File tree 2 files changed +45
-16
lines changed 2 files changed +45
-16
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,28 @@ cache:
24
24
directories :
25
25
- node_modules
26
26
before_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
30
31
# 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
33
35
# 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
36
42
script :
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:
13
13
cache :
14
14
- node_modules
15
15
install :
16
+ # Install Node.js
16
17
- ps : >-
17
18
try { Install-Product node $env:nodejs_version -ErrorAction Stop }
18
19
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
23
36
- npm install
24
37
build : off
25
38
test_script :
26
- - node --version
27
- - npm --version
39
+ # Output version data
40
+ - ps : |
41
+ node --version
42
+ npm --version
43
+ # Run test script
28
44
- npm run test-ci
45
+ # Run linting
29
46
- npm run lint
30
47
version : " {build}"
You can’t perform that action at this time.
0 commit comments