-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
73 lines (66 loc) · 2.52 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
61
62
63
64
65
66
67
68
69
70
71
72
73
dist: xenial
services:
- docker
before_install:
- git remote set-branches --add origin master
- git fetch
matrix:
include:
# E2E Tests
- language: node_js
name: "E2E Tests"
if: branch = master
node_js:
- "8"
script:
- sudo apt-get install -y xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
- make e2e_build_docker_compose
- make e2e_run_on_docker_compose
# Backend - linters & unit tests
- language: python
name: "Backend - Linters & Unit Tests"
script:
- python3 .travis/run_tests_if_subproject_changed.py backend --command="
docker-compose build medtagger_backend_rest medtagger_backend_websocket medtagger_backend_worker medtagger_backend_database_migrations &&
docker-compose run --no-deps medtagger_backend_rest /bin/bash -c \"make install_dev_packages && make test\""
# Backend - functional tests
- language: python
name: "Backend - Functional Tests"
if: branch = master
script:
- python3 .travis/run_tests_if_subproject_changed.py backend --command="
docker-compose -f ./.travis/backend_functional_tests_docker-compose.yml up -d cassandra postgres rabbitmq &&
docker-compose -f ./.travis/backend_functional_tests_docker-compose.yml run medtagger_backend_functional_tests &&
docker-compose down"
# Frontend - linters & unit tests
- language: node_js
name: "Frontend - Linters & Unit Tests"
addons:
chrome: stable
node_js:
- "8"
script:
- python3 .travis/run_tests_if_subproject_changed.py frontend --command="
cd frontend/ &&
npm i &&
ng lint &&
ng test --browsers ChromeHeadless --watch=false"
# Frontend - build production Docker
- language: node_js
name: "Frontend - Production Build"
node_js:
- "8"
script:
- python3 .travis/run_tests_if_subproject_changed.py frontend --command="
docker-compose build medtagger_frontend"
# Build & Push Docker images to the Docker Hub
- language: bash
name: "Build & Push Docker images"
if: branch = master AND type = push AND fork = false
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export VERSION=`cat VERSION`
- export MEDTAGGER_VERSION=$VERSION"_b"$TRAVIS_BUILD_NUMBER
- make docker_build
- make docker_tag_as_nightly
- make docker_push_nightly