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
36 lines (34 loc) · 977 Bytes
/
.travis.yml
File metadata and controls
36 lines (34 loc) · 977 Bytes
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
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:alpha .
- script:
- cp ./config/local.example.json ./config/local.json
- yarn install --frozen-lockfile --non-interactive
- yarn add codacy-coverage
- rm -Rf tmp
- yarn eslint
- NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha -- test/ --timeout=10000 --exit
- cat ./coverage/lcov.info | codacy-coverage
- rm ./config/local.json
after_success:
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker push humanconnection/api-feathers:alpha;
fi