forked from DIRACGrid/DIRAC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
54 lines (50 loc) · 1.83 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
language: python
python:
- "2.7"
env:
matrix:
# Runs the normal pytest on DIRAC except the Core/Security/ tests
- CHECK=pytest
# Runs the normal pytest on DIRAC, using M2Crypto except the Core/Security/ tests
- CHECK=pytest_M2Crypto
# Runs pytest against Core/Security/
- CHECK=pytest_security
# Runs pytest against Core/Security/, with M2Crypto.
# It should not be any different from pytest_security
# since we hardode tests for both pyGSI and M2Crypto
- CHECK=pytest_M2Crypto_security
- CHECK=docs
- CHECK=pylint
- CHECK=pylintPY3K
- CHECK=format
# command to install dependencies
install:
- "pip install --upgrade setuptools"
- "pip install --upgrade pip"
- "pip install -r requirements.txt"
# command to run tests
script:
- export PYTHONPATH=${PWD%/*}
- ls $PYTHONPATH
- if [[ "${CHECK}" == "pytest" ]];
then pytest;
elif [[ "${CHECK}" == "pytest_M2Crypto" ]];
then DIRAC_USE_M2CRYPTO=Yes pytest ;
elif [[ "${CHECK}" == "pytest_security" ]];
then pytest Core/Security/test;
elif [[ "${CHECK}" == "pytest_M2Crypto_security" ]];
then DIRAC_USE_M2CRYPTO=Yes pytest Core/Security/test;
elif [[ "${CHECK}" == "docs" ]];
then .travis.d/checkDocs.sh;
elif [[ "${CHECK}" == "pylint" ]];
then travis_wait 30 .travis.d/runPylint.sh;
elif [[ "${CHECK}" == "pylintPY3K" ]];
then travis_wait 30 .travis.d/runPylint.sh;
elif [[ "${CHECK}" == "format" ]] && [[ "${TRAVIS_PULL_REQUEST}" != "false" ]];
then git remote add GH https://github.com/DIRACGrid/DIRAC.git; git fetch --no-tags GH ${TRAVIS_BRANCH}; git branch -vv; git diff -U0 GH/${TRAVIS_BRANCH} ':(exclude)tests/formatting/pep8_bad.py' | pycodestyle --diff;
fi
## ignore errors for sourcefiles "-i"
after_success:
- if [[ "${CHECK}" == "pytest" ]];
then coveralls -i;
fi