diff --git a/.circleci/config.yml b/.circleci/config.yml index d90f42ae3..278ee492e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,5 @@ version: 2.1 - commands: npm-install: steps: @@ -18,7 +17,7 @@ commands: - run: echo $(python --version) > .python-version - restore_cache: key: py-deps-{{ checksum ".python-version" }}-{{ checksum "docs/requirements.txt" }} - - run: "if [ ! -d ./venv ]; then python -m venv ./venv; fi" + - run: 'if [ ! -d ./venv ]; then python -m venv ./venv; fi' - run: echo "source $(pwd)/venv/bin/activate" >> $BASH_ENV - run: pip install -r ./docs/requirements.txt - save_cache: @@ -26,23 +25,28 @@ commands: paths: - ./venv - aliases: - &node12 image: circleci/node:12 - - &python-docs - # using Python 3.6 as that's the version ReadTheDocs is running + - &python-docs # using Python 3.6 as that's the version ReadTheDocs is running image: circleci/python:3.6-node - &test-steps steps: - checkout - npm-install + - run: npm run build - run: npm run ci:test - jobs: + build: + docker: [<<: *node12] + steps: + - checkout + - npm-install + - run: npm run build + test-node12: docker: [<<: *node12] <<: *test-steps @@ -60,13 +64,17 @@ jobs: steps: - checkout - npm-install + - run: npm run build - run: npm run e2e:apib test-e2e-openapi2: docker: [<<: *node12] steps: - checkout + - restore_cache: + key: build-{{ .Branch }}-{{ .Revision }}-node12 - npm-install + - run: npm run build - run: npm run e2e:openapi2 quality-checks: @@ -93,6 +101,8 @@ jobs: - image: circleci/mongo:latest steps: - checkout + - restore_cache: + key: build-{{ .Branch }}-{{ .Revision }}-node12 - npm-install - run: npm run ci:smoke @@ -105,19 +115,19 @@ jobs: - npm-install - run: npm run ci:release - workflows: version: 2 test-and-release: jobs: - quality-checks + - docs-dry-run - test-node12 - test-node10 - test-node8 - test-e2e-apib - test-e2e-openapi2 - smoke-tests - - docs-dry-run + - release: requires: - quality-checks