forked from rotki/rotki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
130 lines (118 loc) · 4.01 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
119
120
121
122
123
124
125
126
127
128
129
130
#Inspiration for OSX from: https://github.com/bjones1/CodeChat/blob/master/.travis.yml
os: linux
language: python
dist: xenial
conditions: v1
python:
- 3.7
stages:
- name: lint
- name: docs
- name: test
if: NOT commit_message =~ /\[no ci tests\]/ AND tag IS NOT present
- name: ui-test
if: commit_message =~ /\[ui tests\]/ AND tag IS NOT present
- name: deploy
if: tag IS present
env:
global:
- secure: GHP9nhN+M8aYU+XY7R2vzpIftCEv9J/rPnvtJZ8mcYT591Fpom8OvWFrJlHgDDVU0kGKNNE6kMcvZ4zKpOakiKzghONemclUSMotaJSTnWkdEUHi7oUFWtP/VQMv4/ywBbhrIY7R6kZzlJ0QAGh9Yl62Azlq2cal3XrURNP1ehOr5yENgg+rQwPoeqyv5lvcTbI8D5dq+7XqodKdh4toCb2BRbBzj8xPE+m71hzA3McwEBXa5Hn1A2U7HUWM74mOPV1JFoG8ED0qIHfprLWW2mwHZNYgwuLgSsyzNeqN2+jL6OIFoBSzugzfLojD9hmiAJTLI/QNR/7lXN7N/CjBlQos7aeWdaZhnVfj+ca2w0qJ1MLGz17fJWzko5UbWBWFqNF2IMBvI9VB0MXCMYVZEAns7r//ymPM4i6rVD8Tnh0vOkCoRdaM5MEGMfO8hYDKzrcava59CGJA5XjBIka3feb5fkYhUdqnvZCcbZu7upCKQXadTxFxHhKxWXjUD/yOw7o20gujVRnzcsJ51/rKy9gwbGjWh0t/6+2SgWdaM20TJDbrzTLSnI1GHwMphCHkl2vHY10uclauihdjruvh4fwIYhU+Ic1FXsvaKexCDgArOSdp5UxX/xiK/AlHu/8EKV4bg7efKxYTi+EK/sm815GaOi1AVHd/2tm7OLdkfJQ=
_templates:
job-template-linux: &job-template-linux
os: linux
language: python
python: '3.7'
before_install:
# export PATH needs to be here and can't be inside before_install.sh
- mkdir -p $HOME/.bin
- export PATH=$PATH:$HOME/.bin
- .travis/before_install.sh
- export DISPLAY=:99.0;
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- nvm install 12
install:
- .travis/install.sh
script:
- .travis/run_tests.sh
after_success:
- bash <(curl -s https://codecov.io/bash) -F backend
job-template-osx: &job-template-osx
os: osx
language: generic
osx_image: xcode12
env: INSTALL_TYPE=macpython VERSION=3.7.0 VENV=venv
before_install:
# Travis has very low openfiles limit and fails often for OSX. Change that here.
- ulimit -n 1024;
# export PATH needs to be here and can't be inside before_install.sh
- mkdir -p $HOME/.bin
- export PATH=$PATH:$HOME/.bin
- git clone https://github.com/MacPython/terryfy.git
- source terryfy/travis_tools.sh
- get_python_environment $INSTALL_TYPE $VERSION $VENV
- .travis/before_install.sh
install:
- .travis/install.sh
script:
# Unfortunately due to terryfy, we can't have the OSX case
# inside ./run_tests.sh but need to have them all here so
# that the environment is properly picked up
- source terryfy/test_tools.sh
- python pytestgeventwrapper.py $COVERAGE_ARGS rotkehlchen/
job-template-frontend: &job-template-frontend
os: linux
language: node_js
node_js: "12"
before_install:
- cd ./frontend/app
cache:
pip: true
npm: true
directories:
- $HOME/.cache/pip
- $HOME/.cache/.rotkehlchen-test-dir
- $HOME/.ethash
- $HOME/.bin
- $HOME/.cache/Cypress
jobs:
include:
- stage: docs
if: type != cron
install:
- pip install -r requirements_docs.txt
- pip install -e .
script:
- git rev-parse HEAD
- cd docs && make html
- stage: lint
if: type != cron
install:
- pip install -r requirements_lint.txt
- pip install -e .
script:
- git rev-parse HEAD
- make lint
- stage: test
<<: *job-template-linux
- stage: test
if: type == cron
<<: *job-template-osx
- stage: lint
if: type != cron
<<: *job-template-frontend
script:
- npm run lint:check
- npm run lint:style
- npm run build
- stage: test
<<: *job-template-frontend
script:
- npm run test:unit
- cd .. && bash <(curl -s https://codecov.io/bash) -F frontend_unit
- stage: ui-test
<<: *job-template-linux
env: TESTS_TYPE='UI'
after_failure:
- ./tools/scripts/screenshot_upload.py ./failure-screenshots
after_success:
- bash <(curl -s https://codecov.io/bash) -F frontend_integration