From 88b269371f97d24b152e7eaaee4b3b57d4d02373 Mon Sep 17 00:00:00 2001 From: Mauko Quiroga Date: Sun, 29 Aug 2021 17:29:40 +0200 Subject: [PATCH] Install doc in circleci --- .circleci/config.yml | 22 ++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6149b19f86..a916d71e3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,6 +59,28 @@ jobs: name: Checkout docs command: make test.doc.checkout branch=$CIRCLE_BRANCH + - restore_cache: + key: v1-py3-{{ .Branch }}-{{ checksum "setup.py" }} + + - restore_cache: + key: v1-py3-docs-{{ .Branch }}-{{ checksum "doc/requirements.txt" }} + + - run: + name: Create a virtualenv + command: | + mkdir -p /tmp/venv/openfisca_doc + python -m venv /tmp/venv/openfisca_doc + echo "source /tmp/venv/openfisca_doc/bin/activate" >> $BASH_ENV + + - run: + name: Install dependencies + command: make test.doc.install + + - save_cache: + key: v1-py3-docs-{{ .Branch }}-{{ checksum "doc/requirements.txt" }} + paths: + - /tmp/venv/openfisca_doc + check_version: docker: - image: python:3.7 diff --git a/Makefile b/Makefile index 2f8aa59621..910ff675bf 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ test.doc.checkout: ## Install doc dependencies. test.doc.install: @$(call help,$@:) - @pip install --requirement doc/requirements.txt --use-deprecated=legacy-resolver 1> /dev/null + @pip install --requirement doc/requirements.txt 1> /dev/null @pip install --editable .[dev] --upgrade 1> /dev/null ## Dry-build the doc.