Skip to content

Commit

Permalink
Merge pull request #2 from NarrativeScience/circleci
Browse files Browse the repository at this point in the history
CircleCI config
  • Loading branch information
jdrake authored Mar 17, 2020
2 parents 3cd7f2c + bfa1f81 commit d53d680
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: 2.1

orbs:
ghpr: narrativescience/[email protected]

commands:
install-deps:
description: Install dependencies and initialize pre-commit hooks
steps:
- run:
command: |
pip install pre-commit tox flit
pre-commit install
name: Install dependencies

jobs:
test:
docker:
- image: circleci/python:3.6
steps:
- ghpr/build-prospective-branch
- install-deps
- run:
name: Run commit hooks
command: |
pre-commit run \
--source "origin/${GITHUB_PR_BASE_BRANCH}" \
--origin "origin/${CIRCLE_BRANCH}" \
--show-diff-on-failure
- run: tox
- run: flit build
- ghpr/post-pr-comment:
comment: Tests failed!
when: on_fail
publish:
docker:
- image: circleci/python:3.6
steps:
- checkout
- run: pip install flit
- run: flit build
- run: flit publish

workflows:
pull_request:
jobs:
- test:
filters:
branches:
ignore:
- master
publish:
jobs:
- publish:
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
branches:
ignore: /.*/

0 comments on commit d53d680

Please sign in to comment.