-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
112 lines (100 loc) · 2.58 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
language: python
sudo: required
dist: xenial
notifications:
email: false
services:
- postgresql
- redis-server
branches:
only:
- master
cache:
- pip: true
- apt: true
- directories:
- "$HOME/.pyenv_cache"
matrix:
include:
- python: "3.7" # 3.7 development branch
env: PYENV_VERSION="3.5.5"
- python: "3.7" # 3.7 development branch
env: PYENV_VERSION="3.6.1"
- python: "3.7" # 3.7 development branch
env: PYENV_VERSION="3.7.0"
addons:
apt:
packages:
- jq
- flex
- pkg-config
- fuse
- lxc
- lxc-dev
- lxcfs
- libvirt0
- libssl-dev
- git
- libnotify4
- gconf2
- gconf-service
- libappindicator1
- libxtst6
- libnss3
- xvfb
- libgtk2.0-0
- libxss1
before_install:
- export PYENV_ROOT="$HOME/.custom_pyenv"
- mkdir "$PYENV_ROOT"
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- pip install -U wheel
- pip install celery[redis]
- git clone https://github.com/CodeGra-de/CodeGra.de.git backend
- pip install -r backend/requirements.txt
- export PYTHON_NEW="$(which python)"
- wget https://github.com/praekeltfoundation/travis-pyenv/releases/download/0.4.0/setup-pyenv.sh
- source setup-pyenv.sh
- pip install coveralls pytest-cov codecov
- pip install .
- npm ci
- which cgfs
before_script:
- pwd
- ls
- echo -e '[Back-end]\nsqlalchemy_database_uri = postgresql:///travis_ci_test\nDEBUG = true' > backend/config.ini
- echo -e '\n[Celery]\nbroker_url = redis://localhost:6379/0\n' >> backend/config.ini
- mkdir -p backend/uploads
- mkdir -p backend/mirror_uploads
- $PYTHON_NEW --version
- export PYTHONPATH="$PYTHONPATH:$(pwd)"
- export DEBUG=true
- psql -c 'create database travis_ci_test;' -U postgres
- psql travis_ci_test -c 'create extension citext;' -U postgres
- export PYTHON=$PYTHON_NEW
- cd backend
- make db_upgrade
- make test_data
- ( deactivate && source $(dirname $PYTHON_NEW)/activate && make start_dev_server > ../server.log 2>&1 & )
- cd ..
- sleep 6
script:
- make travis_test
- pip install mypy
- if [[ $PYENV_VERSION = "3.5.5" ]]; then > codegra_fs/cgfs_types.py; fi
- mypy codegra_fs
- npm run lint
- pip install -r requirements-docs.txt || true
- ( cd docs; make html )
- travis-sphinx build --source=docs/
after_script:
cat server.log
after_success:
- coveralls
- codecov
- travis-sphinx deploy -c fs-docs.codegra.de