forked from huan/node-facenet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (61 loc) · 1.91 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
os:
- linux
- osx
language: node_js
node_js:
- "8"
cache:
directories:
- models
- node_modules
- python3
before_install: # switch to python 3.5
- if [ "$TRAVIS_OS_NAME" == 'linux' ]; then source ~/virtualenv/python3.5/bin/activate; fi
- if [ "$TRAVIS_OS_NAME" == 'linux' ]; then sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++; fi
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then rvm get stable; fi
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then brew install python3; fi
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then brew install cairo pango libpng; fi
script:
- echo TRAVIS_OS_NAME="$TRAVIS_OS_NAME"
- python3 --version
- node --version
- npm --version
- npm run test
after_success:
- npm run test:coverage
stages:
- test
- pack
- name: deploy
if: branch =~ ^(master|v\d+\.\d+)
jobs:
include:
- stage: pack
before_install: # switch to python 3.5
- source ~/virtualenv/python3.5/bin/activate
- sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
script:
- npm run test:pack && echo 'Npm packing test is passed'
- stage: deploy
before_install: # switch to python 3.5
- source ~/virtualenv/python3.5/bin/activate
- sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
script:
- echo 'Deploying to Docker Hub ...'
- curl --silent -X POST -d '{"from":"travis"}' "$DOCKER_REBUILD_URL"
- echo "Deploying to NPM ..."
- npm version
- npm run dist
deploy:
provider: npm
email: zixia@zixia.net
api_key: "$NPM_TOKEN"
skip_cleanup: true
notifications:
email:
on_success: change
on_failure: change
on_start: never
on_cancel: never
on_error: never