2018-08-01 22:04:16 +02:00
|
|
|
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
|
2019-05-09 11:10:14 +02:00
|
|
|
# Filter out known false positives, while preserving normal output and error codes.
|
|
|
|
# See https://github.com/motet-a/jinjalint/issues/18.
|
2019-05-09 15:46:12 +02:00
|
|
|
# And https://circleci.com/docs/2.0/configuration-reference/#default-shell-options.
|
|
|
|
- run:
|
|
|
|
shell: /bin/bash -e
|
|
|
|
command: pipenv run jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
|
2018-08-21 18:05:17 +02:00
|
|
|
- run: DATABASE_NAME=wagtail.db pipenv run python -u runtests.py
|
2018-08-01 22:04:16 +02:00
|
|
|
|
|
|
|
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-
|
2019-03-21 21:41:14 +01:00
|
|
|
- run: npm install --no-save
|
2018-08-01 22:04:16 +02:00
|
|
|
- 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
|
|
|
|
|
2019-06-21 12:13:34 +02:00
|
|
|
nightly-build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.7.3
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: cd ~ && wget https://nodejs.org/dist/v8.7.0/node-v8.7.0-linux-x64.tar.gz
|
|
|
|
- run: cd /usr/local/ && sudo tar --strip-components 1 -xzf ~/node-v8.7.0-linux-x64.tar.gz
|
2019-06-21 12:31:04 +02:00
|
|
|
- run: pip install --user wheel boto3
|
2019-06-21 12:13:34 +02:00
|
|
|
- run: npm install
|
|
|
|
- run: npm run dist
|
|
|
|
- run: PYTHONPATH=. python scripts/nightly/get_version.py > __init__.py
|
|
|
|
- run: mv __init__.py wagtail/__init__.py
|
|
|
|
- run: python setup.py bdist_wheel
|
|
|
|
- run: python scripts/nightly/upload.py
|
|
|
|
|
2018-08-01 22:04:16 +02:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
2019-06-21 12:13:34 +02:00
|
|
|
jobs:
|
|
|
|
- backend
|
|
|
|
- frontend
|
|
|
|
|
|
|
|
nightly:
|
|
|
|
jobs:
|
|
|
|
- nightly-build
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
|
|
|
cron: "0 0 * * *"
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|