Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest #2

Merged
merged 6 commits into from
Dec 28, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cache docker images on Travis CI.
  • Loading branch information
texodus committed Dec 28, 2017
commit 87774f452084a71d379ccefb9eac937b78dd4945
26 changes: 21 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@

dist: trusty

language: node_js

node_js:
- "8"

env:
global:
- EM_USE_GLOBAL_CACHE=1
- CACHE_DIR=$HOME/.cache/docker
- CACHE_FILE_EMSCRIPTEN=$CACHE_DIR/emscripten.tar.gz
- CACHE_FILE_PUPPETEER=$CACHE_DIR/puppeteer.tar.gz

addons:
apt:
Expand All @@ -18,13 +23,24 @@ sudo: required
services:
- docker

cache:
directories:
- $CACHE_DIR

before_install:
- mkdir boost_includes
- cp -r /usr/include/boost boost_includes/
- if [ -f ${CACHE_FILE_EMSCRIPTEN} ]; then gunzip -c ${CACHE_FILE_EMSCRIPTEN} | docker load; fi
- if [ -f ${CACHE_FILE_PUPPETEER} ]; then gunzip -c ${CACHE_FILE_PUPPETEER} | docker load; fi
- docker run -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash

script:
install:
- npm install
- mkdir boost_includes
- cp -r /usr/include/boost boost_includes/
- ./node_modules/.bin/lerna bootstrap --hoist

script:
- docker exec -it emscripten ./node_modules/.bin/lerna run start --stream
- docker run -it --rm -u root -v $(pwd):/src -w /src zenato/puppeteer ./node_modules/.bin/lerna run test
- npm test

after_script:
- if [ ! -f ${CACHE_FILE_EMSCRIPTEN} ]; then docker save trzeci/emscripten:sdk-incoming-64bit | gzip > ${CACHE_FILE_EMSCRIPTEN}; fi
- if [ ! -f ${CACHE_FILE_PUPPETEER} ]; then docker save zenato/puppeteer | gzip > ${CACHE_FILE_PUPPETEER}; fi