-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
executable file
·33 lines (31 loc) · 1.43 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
# see https://docs.travis-ci.com/user/docker/
services: docker
env:
- DOCKER_COMPOSE_VERSION=1.21.0
before_install:
# use newer docker-compose
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# print docker version
- docker -v
# Disable services enabled by default
# http://docs.travis-ci.com/user/database-setup/#MySQL
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
# set env vars in the build settings to interact with repositories
# see https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
#- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
install:
# Launch services
- docker-compose up -d
- sleep 10
script:
# Run tests
# see https://facebook.github.io/create-react-app/docs/running-tests#travis-ci
- docker exec "colrc-v2-frontend" sh -c "CI=true npm test"
#- docker exec "colrc-v2-backend" npm test
# after_success:
# - if [[ $TRAVIS_BRANCH == 'master' ]]; then docker tag "arizona-linguistics/colrc-v2_backend:latest" && docker push "arizona-linguistics/colrc-v2:latest" ; fi
# - if [[ $TRAVIS_BRANCH == 'master' ]]; then docker tag "arizona-linguistics/colrc-v2_frontend:latest" && docker push "arizona-linguistics/colrc-v2:latest" ; fi