Skip to content

Commit

Permalink
updating CircleCI config to use new build package; updating badges in…
Browse files Browse the repository at this point in the history
… README
  • Loading branch information
jonrkarr committed Aug 4, 2016
1 parent 62963d7 commit 4acccf3
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 365 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -1,6 +1,10 @@
# compiled files
*.pyc

# compiled distributions
build/
dist/

# rst-formatted README
README.rst

Expand Down
16 changes: 6 additions & 10 deletions README.md
@@ -1,3 +1,9 @@
[![PyPI package](https://img.shields.io/pypi/v/nose2unitth.svg)](https://pypi.python.org/pypi/nose2unitth)
[![Documentation](https://readthedocs.org/projects/nose2unitth/badge/?version=latest)](http://nose2unitth.readthedocs.org)
[![Test results](https://circleci.com/gh/KarrLab/nose2unitth.svg?style=shield)](https://circleci.com/gh/KarrLab/nose2unitth)
[![Test coverage](https://coveralls.io/repos/github/KarrLab/nose2unitth/badge.svg)](https://coveralls.io/github/KarrLab/nose2unitth)
[![License](https://img.shields.io/github/license/KarrLab/nose2unitth.svg)](LICENSE.txt)

# nose2unitth
Convert [nose](http://nose.readthedocs.io)-style XML test reports to [UnitTH](http://junitth.sourceforge.net/)-compatible XML reports

Expand All @@ -11,8 +17,6 @@ Convert [nose](http://nose.readthedocs.io)-style XML test reports to [UnitTH](ht
pip install nose2unitth
```

[![PyPI package](https://badge.fury.io/py/nose2unitth.svg)](https://pypi.python.org/pypi/nose2unitth)

## Usage
```
# convert nose-style reports to UnitTH-style reports
Expand All @@ -37,8 +41,6 @@ java \
## Documentation
Please see the documentation at [Read the Docs](http://nose2unitth.readthedocs.io).

[![Documentation](https://readthedocs.org/projects/nose2unitth/badge/?version=latest)](http://nose2unitth.readthedocs.io)

## Tests
### Running the tests
`nose` can be used to run the tests:
Expand All @@ -50,12 +52,6 @@ nosetests tests \

Please note that additional packages are required for testing (see [tests/requirements.txt] (tests/requirements.txt)).

### Test report
[![Test status](https://circleci.com/gh/KarrLab/nose2unitth.svg?style=shield)](https://circleci.com/gh/KarrLab/nose2unitth)

### Coverage report
[![Coverage Status](https://coveralls.io/repos/github/KarrLab/nose2unitth/badge.svg)](https://coveralls.io/github/KarrLab/nose2unitth)

## License
The example model is released under the [MIT license](LICENSE.txt).

Expand Down
109 changes: 4 additions & 105 deletions circle.yml
Expand Up @@ -2,112 +2,11 @@ machine:
python:
version: 2.7.11
dependencies:
cache_directories:
- ~/lib
pre:
# requirements for package
- pip install -r requirements.txt

# requirements for testing and documentation
- sudo apt-get install lftp
- |
mkdir -p ~/lib
if [ ! -f ~/lib/unitth/unitth.jar ]
then
wget http://downloads.sourceforge.net/project/junitth/unitth/unitth-1.3.1/unitth_1_3_1.zip \
-O ~/lib/unitth_1_3_1.zip
unzip ~/lib/unitth_1_3_1.zip -d ~/lib
fi
- pip install -r tests/requirements.txt
- pip install -r docs/requirements.txt
- pip install Karr-Lab-build-utils
- karr-lab-build-utils-install-requirements
test:
pre:
# create folders for artifacts
- mkdir -p $CIRCLE_TEST_REPORTS/nose
- mkdir -p $CIRCLE_ARTIFACTS
override:
# run tests
- |
nosetests tests \
--with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/nose.xml \
--with-coverage --cover-package=nose2unitth
- karr-lab-build-utils-run-tests --test_path tests --with_xml_report --with_coverage
post:
##### test reports
- mkdir -p tests/reports/nose
- mkdir -p tests/reports/unitth
- mkdir -p tests/reports/html
- cp $CIRCLE_TEST_REPORTS/nose.xml tests/reports/nose/$CIRCLE_BUILD_NUM.xml

# copy test history from lab server
- |
lftp sftp://$CODE_SERVER_USERNAME:$CODE_SERVER_PASSWORD@$CODE_SERVER_HOSTNAME \
-e "
mkdir -p $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/nose;
mirror $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/nose tests/reports/nose;
bye;
"
# generate test reports that are readable UnitTH
- |
for report_path in tests/reports/nose/*.xml
do
report_base_name=${report_path##*/}
report_file_name=${report_base_name%.xml}
nose2unitth tests/reports/nose/$report_base_name tests/reports/unitth/$report_file_name/
junit2html tests/reports/nose/$report_base_name tests/reports/unitth/$report_file_name/index.html
done
# generate report of test history
- |
java \
-Dunitth.generate.exectimegraphs=true \
-Dunitth.xml.report.filter= \
-Dunitth.html.report.path=. \
-Dunitth.report.dir=tests/reports/html \
-jar ~/lib/unitth/unitth.jar tests/reports/unitth/*
#copy test history to lab server
- |
lftp sftp://$CODE_SERVER_USERNAME:$CODE_SERVER_PASSWORD@$CODE_SERVER_HOSTNAME \
-e "
mkdir -p $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/nose;
mkdir -p $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/unitth;
mkdir -p $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/html;
put -O $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/nose tests/reports/nose/$CIRCLE_BUILD_NUM.xml;
mirror -e -R tests/reports/unitth/$CIRCLE_BUILD_NUM $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/unitth/$CIRCLE_BUILD_NUM;
mirror -e -R tests/reports/html $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/html;
bye;
"
##### coverage
# copy coverage report to artifacts directory
- cp .coverage $CIRCLE_ARTIFACTS

# post coverage report to coveralls
- coveralls

# post covergage report to lab server
- coverage html -d tests/reports/coverage
- |
lftp sftp://$CODE_SERVER_USERNAME:$CODE_SERVER_PASSWORD@$CODE_SERVER_HOSTNAME \
-e "
mkdir -p $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/coverage;
mirror -R tests/reports/coverage $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/tests/coverage;
bye;
"
##### documentation
# generate documentation
- mkdir -p docs/static
- sphinx-apidoc -f -o docs/source/ nose2unitth
- make -C docs/ html

# copy documentation to lab server
- |
lftp sftp://$CODE_SERVER_USERNAME:$CODE_SERVER_PASSWORD@$CODE_SERVER_HOSTNAME \
-e "
mkdir -p $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/docs;
mirror -R docs/_build/html $CODE_SERVER_BASE_DIR/$CIRCLE_PROJECT_REPONAME/docs;
bye;
"
- karr-lab-build-utils-make-and-archive-reports
225 changes: 0 additions & 225 deletions docs/Makefile

This file was deleted.

0 comments on commit 4acccf3

Please sign in to comment.