From 78442e0a00212fad32216290a7ad8cfd53c97bf3 Mon Sep 17 00:00:00 2001 From: Janneke Janssen Date: Wed, 1 Aug 2018 22:04:16 +0200 Subject: [PATCH] Migrate to circleci 2.0 --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ circle.yml | 21 ------------------- 2 files changed, 49 insertions(+), 21 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..2310240c04 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +version: 2 + +jobs: + backend: + docker: + - image: circleci/python:3.6.4 + steps: + - checkout + - restore_cache: + keys: + - pip-packages-v1-{{ .Branch }} + - pip-packages-v1- + - run: pipenv install -e .[testing] + - save_cache: + paths: + - ~/.local/ + key: pip-package-v1-{{ .Branch }} + - run: pipenv run flake8 wagtail + - run: pipenv run isort --check-only --diff --recursive wagtail + - run: pipenv run python -u runtests.py + + frontend: + docker: + - image: circleci/node:8.11.3 + steps: + - checkout + - restore_cache: + keys: + - node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} + - node-v1-{{ .Branch }}- + - node-v1- + - run: npm install + - save_cache: + paths: + - ~/project/node_modules/ + key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} + - run: npm run lint:js + - run: npm run lint:css + - run: npm run test:unit:coverage -- --runInBand + - run: npm rebuild node-sass + - run: npm run dist + - run: bash <(curl -s https://codecov.io/bash) -F frontend + +workflows: + version: 2 + test: + jobs: + - backend + - frontend diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 3f7b9c40db..0000000000 --- a/circle.yml +++ /dev/null @@ -1,21 +0,0 @@ -machine: - python: - version: 3.6.1 - node: - version: 8.9.3 - -dependencies: - pre: - - pip install -e .[testing] - -test: - override: - - flake8 wagtail - - isort --check-only --diff --recursive wagtail - - npm run lint:js - - npm run lint:css - - python -u runtests.py - - npm run test:unit:coverage -- --runInBand - - npm run dist - post: - - bash <(curl -s https://codecov.io/bash) -F frontend