This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.travis.yml
96 lines (87 loc) · 2.17 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
language: python
matrix:
include:
- name: "Ubuntu14.04 Py27"
dist: trusty
python: "2.7"
env:
- CHAINERUI_PLAIN_INSTALL=1
- name: "Ubuntu16.04 Py35"
dist: xenial
python: "3.5"
- name: "Ubuntu16.04 Py36"
dist: xenial
python: "3.6"
- name: "Ubuntu16.04 Py37, plain install"
dist: xenial
python: "3.7"
env:
- CHAINERUI_PLAIN_INSTALL=1
- name: "Ubuntu16.04 Py37"
dist: xenial
python: "3.7"
env:
- CHAINERUI_COVERAGE_REPORT=1
- CHAINERUI_DEPLOY_JOB=1
services:
- docker
notifications:
email: false
sudo: false
before_install:
- |
if [[ $CHAINERUI_PLAIN_INSTALL == 1 ]]; then
export CHAINERUI_TEST_DEPENDS="[test-ci-plain]";
else
export CHAINERUI_TEST_DEPENDS="[test-ci-contrib]";
fi
- npm install -g npm@6
- npm -v
install:
- pushd frontend
- npm install && npm run build -- --progress=false --profile=false
- popd
- pip install -e .$CHAINERUI_TEST_DEPENDS
- pip list -v
script:
# python style check
- flake8
- autopep8 -r . --global-config .pep8 --diff --exit-code
# frontend style check
- pushd frontend
- npm run lint
- npm run typecheck
- popd
# chainerui install test
- chainerui db create
- chainerui db upgrade
- chainerui server -p 5051 &
- sleep 4
- curl -f http://127.0.0.1:5051/
- pytest --cov=chainerui
- if [[ $CHAINERUI_DEPLOY_JOB == 1 ]]; then pushd docs && make doctest && popd; fi
after_success:
- if [[ $CHAINERUI_COVERAGE_REPORT == 1 ]]; then COVERALLS_TOKEN=$COVERALLS_TOKEN coveralls; fi
- |
if [[ $CHAINERUI_DEPLOY_JOB == 1 ]]; then
pip uninstall -y chainerui
rm -rf build chainerui.egg-info dist
python setup.py sdist
pip install dist/* chainerui --no-cache-dir
fi
deploy:
- provider: pypi
user: $PYPI_MAINTAINER_NAME
password: $PYPI_MAINTAINER_PASS
on:
tags: true
condition: $CHAINERUI_DEPLOY_JOB == 1
allow_failure: false
skip_cleanup: true
- provider: script
script: bash .travis/docker_push.sh
on:
tags: true
condition: $CHAINERUI_DEPLOY_JOB == 1
allow_failure: false
skip_cleanup: true