forked from sardana-org/sardana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (53 loc) · 3.13 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
group: deprecated-2017Q4
language: python
sudo: required
services:
- docker
python:
- "3.5"
env:
global:
# Doctr deploy key for sardana-org/sardana-doc
- secure: "p/0UgVZzPKJQqcvQ/97qMgo9kPCE0cZ6vI+308YEJ2o9xj4a3FsfHCZ/vWtjdsrp1sQbtKVDesx+xmK4CLDzQeC2+Xskv8OZDjaG2jYkHcVosZEM3EGW8rLVKzoDWLr6cTy2wexLgjHPCsmrjukPs49/i5p+WU0no64YoLlZdp9TT+gvWSQJLIk6R4eqt4FHMszPybLv0pvb1SEiCzimlX1WM1pBrE0LHgchd2ZBYSUWTTwe+Koi4HCS4Bads8j20K2e3fFKcmR2u9DfmU+7Mf5HRJsj1LYJgBUF76lUG2/fZfpoDe8sWi+eUewTa3zNM4bhRLpV+pmG0ypplM4pIcdvwiHV03nGSGu6XK6OGQ/Mgsw0fmud4JR4f5g9DgEfERlyJKI4A9mPZQ327OmEwOOl33x2AFJAL05Qvm0yXCkf1dwgYXnZl44SQbAczY1NHFL90t6xbHtmTitJrE2Xb+4BLzMe3OOZj6j/0QeiXA4z1FnZr1s8UoAsm68iW194IuFg1RRG9FTISFWaBew5wzwvAJak0DxkpG0k43VkHiVC7sPHqr5CxXMXO/MuaptK2ti6iLK9xBAEUpO9HluOkeJq5WDIIxBiBS9tPi0i3vIpq87RjHkdw5n7pdIqnuJ1nXUjpWsuUyV3fLkY12fFxSbZgqmNhIE5/o9c5VP/69Y="
matrix:
# - TEST="flake8"
# - TEST="testsuite" DOCKER_IMG=reszelaz/sardana-test
- TEST="doc" DOCKER_IMG=reszelaz/sardana-test
before_install:
# install flake8 to perform python code style check in the script part
# install it using pip in order to get the newest version
- if [ $TEST == "flake8" ]; then sudo apt-get update -qq ; fi
- if [ $TEST == "flake8" ]; then sudo apt-get install -qq python3-pip; fi
- if [ $TEST == "flake8" ]; then sudo pip3 install flake8; fi
install:
# run reszelaz/sardana-test docker container (Debian8 with sardana-deps)
- if [ $TEST != "flake8" ]; then docker pull $DOCKER_IMG; fi
- if [ $TEST != "flake8" ]; then docker run -d --name=sardana-test -h sardana-test --volume=`pwd`:/sardana $DOCKER_IMG; fi
# wait approx. 10 s (supervisor starts mysql and Tango DB)
- if [ $TEST == "testsuite" ]; then sleep 10; fi
# install sardana in order to create the launcher scripts for servers
- if [ $TEST == "testsuite" ]; then docker exec sardana-test bash -c "cd /sardana && python3 setup.py install"; fi
# start Pool and MacroServer necessary for macro tests
- if [ $TEST == "testsuite" ]; then docker exec sardana-test supervisorctl start Pool; fi
- if [ $TEST == "testsuite" ]; then docker exec sardana-test supervisorctl start MacroServer; fi
script:
# make the script fail if a line fails
- set -e
# run flake8 check on all python files in the project
- if [ $TEST == "flake8" ]; then ci/flake8_diff.sh; fi
# run the full testsuite
- if [ $TEST == "testsuite" ]; then docker exec sardana-test xvfb-run -s '-screen 0 1920x1080x24' /bin/bash -c "pytest /usr/local/lib/python3.5/dist-packages/sardana-*.egg/sardana"; fi
# build docs
- if [ $TEST == "doc" ]; then docker exec -t sardana-test /bin/bash -c "cd /sardana ; sphinx-build -W doc/source/ build/sphinx/html" ; fi
- if [ $TEST == "doc" ]; then docker exec -t sardana-test /bin/bash -c "touch /sardana/build/sphinx/html/.nojekyll" ; fi
deploy:
- provider: pages
local_dir: build/sphinx/html
repo: sardana-org/sardana-doc
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
fqdn: sardana-controls.org # Set custom domain
on:
branch: develop
condition: "$TEST == doc"