wagtail/.circleci/config.yml

87 wiersze
2.6 KiB
YAML
Czysty Wina Historia

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

version: 2
jobs:
backend:
docker:
- image: cimg/python:3.8.11
environment:
PIPENV_VENV_IN_PROJECT: true
steps:
- checkout
- restore_cache:
key: pipenv-v1-{{ checksum "setup.py" }}
# Only install if .venv wasnt cached.
- run: |
if [[ ! -e ".venv" ]]; then
pipenv install -e .[testing]
fi
- save_cache:
key: pipenv-v1-{{ checksum "setup.py" }}
paths:
- .venv
- run: pipenv run flake8
- run: pipenv run isort --check-only --diff .
# Filter out known false positives, while preserving normal output and error codes.
# See https://github.com/motet-a/jinjalint/issues/18.
# 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'
- run: pipenv run doc8 docs
- run: DATABASE_NAME=wagtail.db pipenv run python -u runtests.py
frontend:
docker:
- image: circleci/node:14
steps:
- checkout
- restore_cache:
keys:
- node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
- node-v1-{{ .Branch }}-
- node-v1-
- run: npm install --no-save
- save_cache:
paths:
- ~/project/node_modules/
key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
- run: npm run build
- run: npm run lint:js
- run: npm run lint:css
- run: npm run test:unit:coverage -- --runInBand
- run: npm run dist
- run: bash <(curl -s https://codecov.io/bash) -F frontend
nightly-build:
docker:
- image: cimg/python:3.8.11
steps:
- checkout
- run: cd ~ && wget https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-x64.tar.gz
- run: cd /usr/local/ && sudo tar --strip-components 1 -xzf ~/node-v14.17.5-linux-x64.tar.gz
- run: pip install --user wheel boto3
- 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
workflows:
version: 2
test:
jobs:
- backend
- frontend
nightly:
jobs:
- nightly-build
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- main