add CircleCI

This commit is contained in:
Jiri BOROVEC 2019-08-06 10:46:14 +02:00
parent 632d07b490
commit 4e0b9c50e7
7 changed files with 63 additions and 9 deletions

60
.circleci/config.yml Normal file
View File

@ -0,0 +1,60 @@
version: 2.0
references:
install_pips: &install_pips
run:
name: Install PyPI dependences
command: |
pip install -r requirements.txt --user
sudo pip install -r ./tests/requirements.txt
python --version ; pwd ; ls -l
pip --version ; pip list
test_coverage: &test_coverage
run:
name: Testing and Formating
command: |
check-manifest --ignore tox.ini
python setup.py check -m -s
coverage run --source pytorch_lightning -m py.test pytorch_lightning tests examples -v --doctest-modules
flake8 . --max-line-length=100
codecov
jobs:
Py3.6:
docker:
- image: circleci/python:3.6
steps: &steps
- checkout
# INSTALLATION
- *install_pips
# TESTING
- *test_coverage
# DOCUMENTATION
# PASSING
- run:
name: Finalise
command: |
python setup.py install --user
coverage report && coverage xml -o test-reports/coverage.xml
# RESULTS
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
Py3.7:
docker:
- image: circleci/python:3.7
steps: *steps
workflows:
version: 2
build:
jobs:
- Py3.6
- Py3.7

View File

@ -31,7 +31,6 @@ cache: pip
install:
- pip install -r requirements.txt
- pip install -r ./tests/requirements.txt
- pip install tox
- pip --version ; pip list
script:

View File

@ -27,10 +27,12 @@ exclude docs
include requirements.txt
# Exclude build configs
recursive-exclude .circleci *
exclude *.yml
prune .git
prune .github
prune .circleci
prune notebook*
prune temp*
prune test*

View File

@ -45,7 +45,6 @@ install:
- pip install -U --user pip
- pip install -r requirements.txt
- pip install -r ./tests/requirements.txt
- pip install tox
# scripts to run before tests (working directory and environment changes are persisted from the previous steps such as "before_build")
before_test:

View File

@ -1,4 +1,4 @@
nose>=1.3.7
tox
coverage
codecov
pytest>=3.0.5

View File

@ -43,8 +43,5 @@ select = E,W,F
doctests = True
verbose = 2
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
ignore =
E402
E501
format = pylint
max-line-length = 100

View File

@ -11,10 +11,7 @@ rm -rf ./dist/*
python3 setup.py sdist
twine upload dist/*
# to update docs
# cd to root dir
# mkdocs gh-deploy