-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.travis.yml
119 lines (106 loc) Β· 2.67 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
sudo: required
dist: xenial
language: python
python:
- '3.7'
services:
- postgresql
- redis-server
addons:
apt:
sources:
- ubuntu-toolchain-r-test
cache:
- pip
- npm
install:
- pip install -r requirements.txt
- pip install -r requirements-test.txt
script: skip
# We only build if it is a pr into master or it is a pr and it is not into master
if:
branch = master OR (type = pull_request AND NOT branch = master)
stages:
- name: lint
- name: test
- name: deploy
if: branch = master AND NOT fork AND type = push
- name: announcement
jobs:
include:
- stage: lint
name: "style checks typescript"
install:
- cd webapp
- npm install
- cd $TRAVIS_BUILD_DIR
script:
- cd webapp
- npm run tslint
- stage: lint
name: "style checks python"
script:
- cd $TRAVIS_BUILD_DIR
- pytest imports_test.py
- stage: test
name: "server unit tests 3.6"
python:
- '3.6'
script:
- pytest tests/server_tests --cov=./
- bash <(curl -s https://codecov.io/bash) -c -F server
after_success:
- codecov
- stage: test
name: "server unit tests 3.7"
python:
- '3.7'
script:
- pytest tests/server_tests --cov=./
- bash <(curl -s https://codecov.io/bash) -c -F server
after_success:
- codecov
- stage: test
name: "integration tests"
python:
- '3.7'
before_install:
- cd webapp
- npm install
- cd $TRAVIS_BUILD_DIR
script:
- cd webapp
- npm start &
- cd $TRAVIS_BUILD_DIR
- celery -A backend.tasks.celery_worker.celery worker --pool=solo -l ERROR --logfile=/dev/null &
# Wait for all other systems to be setup
- sleep 30
- pytest tests/integration_tests --cov=./
- bash <(curl -s https://codecov.io/bash) -c -F integration
after_success:
- codecov
- stage: test
name: "react unit tests"
install:
- cd webapp
- npm install
- npm install codecov -g
- cd $TRAVIS_BUILD_DIR
script:
- cd webapp
- npm test
after_success:
- bash <(curl -s https://codecov.io/bash) -c -F frontend
- stage: deploy
name: "Deploy to Production"
install: skip
script: skip
- stage: announcement
name: "Announce success"
python: "3.7"
install: skip
script: skip
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x .travis/send.sh
- ./.travis/send.sh success $WEBHOOK_URL