forked from BinaryStudioAcademy/bsa-2017-bebeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (38 loc) · 1.16 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
sudo: required
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.14.0
cache:
directories:
- .composer/
before_install:
- openssl aes-256-cbc -K $encrypted_31fd2d3149ec_key -iv $encrypted_31fd2d3149ec_iv -in .travis/id_rsa.enc -out .travis/id_rsa -d
- sudo chmod 600 .travis/id_rsa
- sudo service mysql stop
- 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
script:
- cp .env.example .env
- docker-compose pull
- docker-compose run --rm composer install
- docker-compose run --rm node npm install -q
- docker-compose run --rm node npm run prod
- docker-compose up --exit-code-from tests tests
branches:
only:
- master
- development
deploy:
- provider: script
skip_cleanup: true
script: scripts/deploy-prod.sh
on:
branch: master
- provider: script
skip_cleanup: true
script: scripts/deploy-stage.sh
on:
branch: development