Skip to content

Commit 7f80819

Browse files
authored
Add analysis to build (#2)
* add flake8 analysis * fix env variable syntax * add flake8 command * fix env variable syntax * fix bash syntax * add code coverage * add tests metatag * put tests in folder
1 parent 3e9f342 commit 7f80819

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: python
22
python:
3-
- "3.5"
43
- "2.7"
4+
- "3.5"
55

66
before_install:
77
- mkdir -p $HOME/bin
@@ -13,7 +13,12 @@ install:
1313

1414
script:
1515
- export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR
16-
- py.test --junit-xml=testresults.xml
16+
- py.test --junit-xml=testresults.xml --cov=python_testspace_xml --cov-report xml:coverage.xml --cov-report term
1717

1818
after_script:
19-
- testspace [$TRAVIS_PYTHON_VERSION]testresults*.xml
19+
- if [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then
20+
flake8 --max-line-length=100 --output-file=flake8.txt --exit-zero;
21+
testspace [${TRAVIS_PYTHON_VERSION}]flake8.txt{lint} [${TRAVIS_PYTHON_VERSION}/tests]testresults.xml{tests} [${TRAVIS_PYTHON_VERSION}]coverage.xml;
22+
else
23+
testspace [${TRAVIS_PYTHON_VERSION}/tests]testresults.xml{tests};
24+
fi

requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
pytest
2-
lxml
2+
lxml
3+
flake8
4+
pep8-naming
5+
pytest-cov

0 commit comments

Comments
 (0)