-
-
Notifications
You must be signed in to change notification settings - Fork 215
/
.travis.yml
70 lines (61 loc) · 2.65 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
dist: xenial # required for Python >= 3.7
language: python
python:
- "3.8"
install: travis_wait 30 mvn install
install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Replace dep1 dep2 ... with your dependencies
- conda env create -q -n test-environ --file environment.yml
- conda activate test-environ
- python setup.py install
# - pip install -r requirements.txt
# command to run tests
script:
- which python
# uncoment the block below to automaticly verify code style
# ########## verifying code style ##########
# # Run yapf on all .py files in all subfolders
# # We must ignore E402 module level import not at top of file
# # because of use case sys.path.append('..'); import <module>
# - num_errors_before=`find . -name \*.py -exec yapf --diff --recursive {} + | wc -l`
# - echo $num_errors_before
# - cd "$TRAVIS_BUILD_DIR"
# - git --version
# - git config --global user.email "fulano.detal@smt.ufrj.br"
# # From https://help.github.com/articles/setting-your-username-in-git/:
# # "Tip: You don't have to use your real name--any name works. Git
# # actually associates commits by email address; the username is only
# # used for identification. If you use your email address associated
# # with a GitHub account, we'll use your GitHub username, instead of
# # this name.
# - git config --global user.name "Travis"
# - git checkout $TRAVIS_BRANCH
# - git branch -a
# - find . -name \*.py -exec yapf --in-place --recursive {} +
# - num_errors_after=`find . -name \*.py -exec yapf --diff --recursive {} + | wc -l`
# - echo $num_errors_after
# - |
# if (( $num_errors_after < $num_errors_before )); then
# git commit -a -m "Travis-CI automatically fixing code style"
# git config --global push.default simple # Push only to the current branch.
# # Make sure to make the output quiet, or else the API token will
# # leak! This works because the API key can replace your password.
# git push --quiet
# fi
# - cd "$TRAVIS_BUILD_DIR"
# # List the remaining errors - these will have to be fixed manually
# - find . -name \*.py -exec yapf --diff --recursive {} +
# ############################################
- pytest