Skip to content

Commit

Permalink
add simple CircleCI (#2609)
Browse files Browse the repository at this point in the history
* add simple CircleCI

* ignore some

* note
  • Loading branch information
Borda committed Jul 14, 2020
1 parent 6b6d283 commit 548dbd1
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2.0

references:

install_deps: &install_deps
run:
name: Install Dependences
command: |
sudo apt-get update && sudo apt-get install -y cmake
pip install -r requirements/base.txt -q
pip install -r requirements/test.txt -q
tests: &tests
run:
name: Testing
command: |
python --version ; pip --version ; pip list
python -m pytest pytorch_lightning -v --junitxml=test-reports/pytest_junit.xml --ignore=pytorch_lightning/loggers/comet.py --ignore=pytorch_lightning/loggers/mlflow.py --ignore=pytorch_lightning/loggers/neptune.py --ignore=pytorch_lightning/loggers/test_tube.py --ignore=pytorch_lightning/loggers/wandb.py --ignore=pytorch_lightning/metrics/sklearns.py
no_output_timeout: 15m

make_docs: &make_docs
run:
name: Make Documentation
command: |
# First run the same pipeline as Read-The-Docs
# apt-get update && apt-get install -y cmake
# using: https://hub.docker.com/r/readthedocs/build
# we need to use py3.7 ot higher becase of an issue with metaclass inheritence
pyenv global 3.7.3
python --version
pip install -r requirements/docs.txt
cd docs; make clean; make html --debug --jobs 2 SPHINXOPTS="-W"
jobs:

Build-Docs:
docker:
- image: readthedocs/build:latest
steps:
- checkout
- *make_docs
- store_artifacts:
# allows us to preview the generated html pages
path: docs/build/html/
destination: html

CPU-Tests:
# todo: to be replaced by TPU tests
docker:
- image: circleci/python:3.6
environment:
- TORCH_VERSION: "torch"
steps: &steps
- checkout
- *install_deps
- *tests
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports

workflows:
version: 2
build:
jobs:
- Build-Docs
- CPU-Tests

0 comments on commit 548dbd1

Please sign in to comment.