-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (35 loc) · 961 Bytes
/
.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
language: node_js
node_js:
- "node"
sudo: required
services:
- docker
before_install:
- . $HOME/.nvm/nvm.sh
- nvm install 8
- nvm use 8
- npm install -g yarn
stages:
- name: test
- name: push to dockerhub
if: tag IS present
jobs:
include:
- stage: test
script:
- yarn lint
name: lint
- stage: test
script:
- yarn install
# Default gitbase port 3306 is in use in Travis
- sed -i "s/3306:3306/"3356:3306"/" docker-compose.yml
- GITBASE_GQL_DB_PORT=3356 yarn test
- yarn coverage
name: integration tests
- stage: push to dockerhub
script:
- docker build -t carlosms/gitbase-graphql:latest -t carlosms/gitbase-graphql:$TRAVIS_BRANCH .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push carlosms/gitbase-graphql:latest
- docker push carlosms/gitbase-graphql:$TRAVIS_BRANCH