-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
62 lines (51 loc) · 1.8 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
sudo: true
dist: trusty
language: node_js
node_js:
- "7.6"
# this is automatically included into test stage
before_script:
- cd api
- yarn install
script:
- yarn run test-unit
env:
DOCKER_COMPOSE_VERSION: 1.13.0
_install_docker: &_install_docker
- sudo apt-get remove docker docker-engine
- sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- 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
# https://github.com/docker-library/elasticsearch/issues/111
- sudo sysctl -w vm.max_map_count=262144
jobs:
include:
- stage: security
before_script: skip
script:
- make check-security --no-print-directory
- stage: test
before_script:
*_install_docker
script:
- docker-compose -f docker-compose-ci.yml build
- make up --no-print-directory
- sleep 20 # required to ensure seeds are loaded
- make log-api --no-print-directory
- COMMAND="API_BASE_URL=http://localhost:80 yarn run bdd" make run-in-api --no-print-directory
- make clean --no-print-directory
- stage: deploy
before_script: skip
script:
- make website-install --no-print-directory
- make website-build --no-print-directory
deploy:
skip_cleanup: true
provider: surge
project: ./website/build/