forked from ASPP/pelita
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (55 loc) · 1.99 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
language: python
sudo: false
matrix:
include:
- python: 3.6
- python: 3.7
dist: xenial
sudo: true
env:
global:
# our GITHUB_TOKEN
secure: CjDQa+g+9wr4vHq3Wo5sIKOxvfWZPIbSl+IHU1CgZHvRafFeANJHBS/bBpHM36lGHhNUFDByz7wXMD4AGPQiqJ1uQHuJ/CKZEBfPJj6BJ9JIy61FJT2UBtx1iVXc+39D7MpRt2IkgnBasjuYTlHEK8q9B8dhAIqt0zpK3pYOUG4=
# install dependencies and pelita
install:
- pip install pytest-cov codecov coveralls
- pip install -e .
# test scripts
script:
- >
python -c "import zmq; print('Using pyzmq {} and zmq {}.'.format(zmq.pyzmq_version(), zmq.zmq_version()))" &&
echo "Starting tests..." && python -m pytest test/ && echo "Tests finished." && echo "Starting pelita CLI as a module..." &&
python -m pelita.scripts.pelita_main --null && echo "Pelita CLI as a module finished." && echo "Starting pelita CLI as a script..." &&
pelita --null --rounds 100 --size small $player && echo "Pelita CLI as a script finished."
- >
if [[ $TRAVIS_PYTHON_VERSION == 3.6 || $TRAVIS_PYTHON_VERSION == 3.7 ]] ; then
echo "Starting tournament..." && pelita-tournament --non-interactive --viewer null && echo "Tournament finished."
fi
- >
if [[ $TRAVIS_PYTHON_VERSION == 3.6 || $TRAVIS_PYTHON_VERSION == 3.7 ]] ; then
# We must clone pelita_template to a location outside of the pelita repo
# Otherwise pelita’s own setup.cfg will be used for test configuration
(cd .. && echo "Test pelita_template..." && git clone https://github.com/ASPP/pelita_template) && ( cd ../pelita_template/ && python -m pytest . &&
echo "Finished testing pelita_template.")
fi
# push coverage
#after_success:
#- codecov
#- coveralls
# generate sphinx documentation in doc/build/html/
before_deploy:
- python -m pip install sphinx
- git fetch --unshallow
- git fetch --tags
- . ./build-docs.sh
# deploy docs
deploy:
provider: pages
local-dir: doc/build/html/
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: master
python: 3.7
repo: ASPP/pelita