forked from BlueBlock/MoonMail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.kkk.yml
64 lines (62 loc) · 1.89 KB
/
.travis.kkk.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
language: node_js
sudo: required
node_js:
- '8.10'
before_install: # if "install" is overridden
# Repo for Yarn
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn
- yarn install
env:
global:
- ES_VERSION=6.0.0
- ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
matrix:
- TEST_DIR=events
- TEST_DIR=api
- TEST_DIR=private
- TEST_DIR=extensions
- TEST_DIR=template-marketplace
- TEST_DIR=lists-microservice
- TEST_DIR=emails-microservice
- TEST_DIR=campaigns-microservice
- TEST_DIR=webhooks-microservice
- TEST_DIR=support/events-router
script:
- cd $TEST_DIR && yarn install && yarn test
- |
if [[ $TEST_DIR == "lists-microservice" ]]; then
wget ${ES_DOWNLOAD_URL}
tar -xzf elasticsearch-${ES_VERSION}.tar.gz
./elasticsearch-${ES_VERSION}/bin/elasticsearch &
wget -q --waitretry=3 --retry-connrefused -T 10 -O - http://127.0.0.1:9200
yarn run test:integration
#if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
# yarn run test:system
#fi
fi
if [[ $TEST_DIR == "support/events-router" ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
if [[ $TRAVIS_BRANCH == "master" ]]; then
yarn deploy
elif [[ $TRAVIS_BRANCH == "release" ]]; then
yarn deploy:prod
fi
fi
fi
cache:
yarn: true
directories:
- "$(npm config get prefix)/lib/node_modules"
- node_modules
- events/node_modules
- api/node_modules
- private/node_modules
- extensions/node_modules
- template-marketplace/node_modules
- lists-microservice/node_modules
- emails-microservice/node_modules
- campaigns-microservice/node_modules
- support/events-router/node_modules