From 548dbd171b6c887c828ab74624ffd7823e5283a7 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 14 Jul 2020 20:04:04 +0200 Subject: [PATCH] add simple CircleCI (#2609) * add simple CircleCI * ignore some * note --- .circleci/config.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100755 index 0000000000..1d6802dca6 --- /dev/null +++ b/.circleci/config.yml @@ -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