-
Notifications
You must be signed in to change notification settings - Fork 59
/
.travis.yml
50 lines (49 loc) · 1.53 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
sudo: required
language: node_js
services:
- docker
node_js:
- 8
before_install:
- docker version
- docker run -d -p 127.0.0.1:5984:5984 klaemo/couchdb:1.6.1
- docker build -t hoodiehq/hoodie-app-tracker .
- npm prune
before_script:
# tell us what CouchDB version we have
- curl http://localhost:5984
# create secret (works around CouchDB racing issue)
- curl -X PUT -d '"78875068a1979fb910d5d8f37d316aa4"' 'http://localhost:5984/_config/couch_httpd_auth/secret'
# create admin account for testing (admin:secret)
- curl -X PUT -d '"secret"' 'http://localhost:5984/_config/admins/admin'
# required for headless firefox / selenium test
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
env:
matrix:
- CLIENT=saucelabs:chrome
# test with CouchDB (by default it tests with PouchDB)
- hoodie_dbUrl=http://admin:secret@127.0.0.1:5984 CLIENT=saucelabs:chrome
# Trigger a push build on master and greenkeeper branches + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
- /^greenkeeper.*$/
jobs:
include:
- stage: release
node_js: lts/*
script:
- npm start &
- cypress run
after_success:
- npm run semantic-release
- stage: deploy
script: skip
deploy:
- provider: script
script: "docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD && docker push hoodiehq/hoodie-app-tracker"
skip_cleanup: true
on:
branch: master