File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,22 @@ before_install:
2828- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${ARCH}
2929- sh -e /etc/init.d/xvfb start
3030- if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi
31+
32+ install :
33+ # Check the size of caches
34+ - du -sh ./node_modules || true
35+ # Install npm dependecies and ensure that npm cache is not stale
36+ - tools/npm/install-dependencies.sh
37+
3138before_script :
3239- mkdir -p $LOGS_DIR
40+
3341script :
3442- ./scripts/ci/build_and_test.sh ${MODE}
43+
3544after_script :
3645- ./scripts/ci/print-logs.sh
46+
3747notifications :
3848 webhooks :
3949 urls :
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ SHRINKWRAP_FILE=npm-shrinkwrap.json
6+ SHRINKWRAP_CACHED_FILE=node_modules/npm-shrinkwrap.cached.json
7+
8+ if diff -q $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE ; then
9+ echo ' No shrinkwrap changes detected. npm install will be skipped...' ;
10+ else
11+ echo ' Blowing away node_modules and reinstalling npm dependencies...'
12+ rm -rf node_modules
13+ npm install
14+ cp $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE
15+ echo ' npm install successful!'
16+ fi
You can’t perform that action at this time.
0 commit comments