Skip to content

Commit

Permalink
Update config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsteve committed Apr 22, 2020
1 parent 48ec994 commit c712dbe
Showing 1 changed file with 44 additions and 47 deletions.
91 changes: 44 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,77 @@
no-backports: &no-backports
name: Skip any branches called backport*
command: |
if [[ "${CIRCLE_BRANCH}" = *"backport"* ]]; then
circleci step halt
fi
skip-check: &skip-check
name: Check for [ci skip]
command: bash .circleci/early_exit.sh

merge-check: &merge-check
name: Check if we need to merge upstream master
command: |
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
git fetch origin --tags
git fetch origin +refs/pull/$CIRCLE_PR_NUMBER/merge:pr/$CIRCLE_PR_NUMBER/merge
git checkout -qf pr/$CIRCLE_PR_NUMBER/merge
fi
apt-run: &apt-install
name: Install apt packages
command: |
apt update
apt install -y graphviz build-essential
sudo apt update
sudo apt install -y graphviz build-essential
tox-install: &tox-install
name: Install Tox
command: |
sudo pip install tox codecov
version: 2
jobs:
twine-check:
egg-info-37:
docker:
- image: continuumio/miniconda3
- image: circleci/python:3.7
steps:
- checkout
- run: python setup.py egg_info

pycodestyle:
docker:
- image: circleci/python:3.7
steps:
- checkout
- run: sudo pip install pycodestyle
- run: pycodestyle --count

tests:
docker:
- image: circleci/python:3.7
steps:
- checkout
- run: *no-backports
- run: *skip-check
- run: *merge-check
- run: pip install -U pep517
- run: python -m pep517.build --source .
- run: python -m pip install -U --user --force-reinstall twine
- run: python -m twine check dist/*
- run: *apt-install
- run: *tox-install
- run: tox -e py37
- run: codecov

html-docs:
docker:
- image: continuumio/miniconda3
- image: circleci/python:3.7
steps:
- checkout
- run: *no-backports
- run: *skip-check
- run: *merge-check
- run: *apt-install
- run: pip install -U tox
- run: tox -e build_docs
- run:
name: Prepare for upload
command: |
# If it's not a PR, don't upload
if [ -z "${CIRCLE_PULL_REQUEST}" ]; then
rm -r docs/_build/html/*
else
# If it is a PR, delete sources, because it's a lot of files
# which we don't really need to upload
rm -r docs/_build/html/_sources
fi
- run: *tox-install
- run: tox -e py37-build_docs
- store_artifacts:
path: docs/_build/html

- run:
name: "Built documentation is available at:"
command: DOCS_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/docs/_build/html/index.html"; echo $DOCS_URL

workflows:
version: 2

twine-check:
egg-info:
jobs:
- twine-check
- egg-info-37

pycodestyle:
jobs:
- pycodestyle

test-documentation:
jobs:
- html-docs

notify:
webhooks:
- url: https://giles.cadair.dev/circleci
tests:
jobs:
- tests

0 comments on commit c712dbe

Please sign in to comment.