forked from Human-Connection/API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
38 lines (36 loc) · 1.1 KB
/
.travis.yml
File metadata and controls
38 lines (36 loc) · 1.1 KB
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
language: node_js
node_js:
- "8"
cache:
yarn: true
directories:
- node_modules
services:
# we need docker for building the image and mongo for testing
- docker
- mongodb
install:
# nothing!
jobs:
include:
- stage: Prepare Cache
script: true
- stage: Build and Test
script:
- docker build -t humanconnection/api-feathers .
- script:
- yarn install --frozen-lockfile --non-interactive
- yarn global add codacy-coverage
- yarn run ci
- cat ./coverage/lcov.info | codacy-coverage
after_success:
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker tag humanconnection/api-feathers humanconnection/api-feathers:alpha;
docker push humanconnection/api-feathers:alpha;
fi
- if [ $TRAVIS_BRANCH == "develop" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker tag humanconnection/api-feathers humanconnection/api-feathers:edge;
docker push humanconnection/api-feathers:edge;
fi