Skip to content

Commit

Permalink
feat(stark-all): enable npm ci for travis + add package-lock.json + f…
Browse files Browse the repository at this point in the history
…orce registry.npmjs.org as registry

ISSUES CLOSED: #43
  • Loading branch information
ageorges-nbb committed Jul 30, 2018
1 parent a041722 commit f47d610
Show file tree
Hide file tree
Showing 18 changed files with 67,484 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ node_modules/
npm-debug.log
/npm-debug.log.*

# NPM
package-lock.json

# OS generated files #
Desktop.ini
Thumbs.db
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ before_install:
# TODO remove this variable as it's probably not needed (defined by travis by default?): https://docs.travis-ci.com/user/environment-variables/
- TRAVIS=1 # used by build.sh
- npm i -g npm@5.8.0
- if [[ $TRAVIS_BRANCH == greenkeeper* ]]; then npm i -g greenkeeper-lockfile; fi
# This ensures that we are authenticated without requiring to have an actual .npmrc file within the project
- 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
- 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc'

install:
# Create file & folder for Travis logs
# cfr scripts/_travis-fold.sh
- mkdir -p $LOGS_DIR
- touch $LOGS_DIR/build-perf.log
- npm install --no-optional
- npm run install:travis:all
# TODO uncomment this when npmjs registry fixed
# - npm ci
# - npm run install:ci:all
- touch $LOGS_DIR/build-perf.log
- if [[ $TRAVIS_BRANCH == greenkeeper* ]]; then npm i --no-optional; else npm ci; fi
- if [[ $TRAVIS_BRANCH == greenkeeper* ]]; then npm run install:travis:all; else npm run install:ci:all; fi

env:
global:
Expand All @@ -40,6 +38,9 @@ cache:
directories:
- $HOME/.npm

before_script:
- if [[ $TRAVIS_BRANCH == greenkeeper* ]]; then greenkeeper-lockfile-update; fi

# Not needed since we use Puppeteer in karma.conf.ci.js
# It downloads Chrome itself and works with or without Travis
#addons:
Expand All @@ -56,3 +57,4 @@ script:

after_success:
- npm run test:ci:coveralls:combined
- if [[ $TRAVIS_BRANCH == greenkeeper* ]]; then greenkeeper-lockfile-upload; fi
Loading

0 comments on commit f47d610

Please sign in to comment.