Merge pull request #91 from GNS3/speed-up-travis

Speed up TravisCI, AppVeyor and CircleCi, Fixes: #46,#47,#48
This commit is contained in:
ziajka 2018-03-30 07:22:41 +02:00 committed by GitHub
commit 343544ff4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 1 deletions

View File

@ -3,6 +3,10 @@ version: 1.0.{build}
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
cache:
- node_modules
- '%LOCALAPPDATA%/Yarn'
platform:
- x64

View File

@ -14,6 +14,14 @@ jobs:
sudo systemsetup -settimezone Europe/Warsaw
echo "Today is $(date +"%Y-%m-%d %T")"
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }}
- yarn-packages-master
- yarn-packages-
- run:
name: Install project
# there is an issue with yarn and cache during executed on CI; for now we just run it twice, second should
@ -22,6 +30,12 @@ jobs:
yarn || true
yarn || true
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:
name: Building WebUI for distribution
command: |

View File

@ -6,6 +6,11 @@ node_js:
# Issue with Travis: https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-356362524
sudo: required
cache:
yarn: true
directories:
- node_modules
addons:
apt:
sources:
@ -37,7 +42,6 @@ before_install:
before_script:
- yarn
# greenkeeper-lockfile support
- greenkeeper-lockfile-update
- npm install -g codecov