Skip to content

Commit eb9ec09

Browse files
authored
Tweak pre commit and re-enable CCI PR tests
2 parents b6e6510 + 97a92f7 commit eb9ec09

File tree

4 files changed

+36
-37
lines changed

4 files changed

+36
-37
lines changed

.circleci/config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,35 @@ version: 2.1
33
orbs:
44
ghpr: narrativescience/[email protected]
55

6+
commands:
7+
install-deps:
8+
description: Install dependencies and initialize pre-commit hooks
9+
steps:
10+
- run:
11+
command: |
12+
pip install pre-commit tox flit
13+
pre-commit install
14+
name: Install dependencies
15+
616
jobs:
17+
test:
18+
docker:
19+
- image: circleci/python:3.7
20+
steps:
21+
- ghpr/build-prospective-branch
22+
- install-deps
23+
- run:
24+
name: Run commit hooks
25+
command: |
26+
pre-commit run \
27+
--source "origin/${GITHUB_PR_BASE_BRANCH}" \
28+
--origin "origin/${CIRCLE_BRANCH}" \
29+
--show-diff-on-failure
30+
- run: tox
31+
- run: flit build
32+
- ghpr/post-pr-comment:
33+
comment: Tests failed!
34+
when: on_fail
735
publish:
836
docker:
937
- image: circleci/python:3.7
@@ -14,6 +42,13 @@ jobs:
1442
- run: flit publish
1543

1644
workflows:
45+
pull_request:
46+
jobs:
47+
- test:
48+
filters:
49+
branches:
50+
ignore:
51+
- master
1752
publish:
1853
jobs:
1954
- publish:

.flake8

Lines changed: 0 additions & 20 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,3 @@ repos:
4040
language: python
4141
types: [file, python]
4242
additional_dependencies: [black==19.3b0]
43-
44-
- id: pydocstyle
45-
name: Lint Python docstrings (pydocstyle)
46-
entry: pydocstyle
47-
language: python
48-
types: [file, python]
49-
additional_dependencies: [pydocstyle==4.0.1]
50-
51-
- id: flake8
52-
name: Lint Python (flake8)
53-
entry: flake8 --config .flake8
54-
language: python
55-
types: [file, python]
56-
additional_dependencies:
57-
- flake8==3.7.9
58-
- "flake8-import-order<0.19,>=0.18"
59-
- flake8-print>=3.1.4,<4

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
aiohttp >= 3.6.2
12
certifi >= 14.05.14
23
future; python_version<="2.7"
34
six >= 1.10

0 commit comments

Comments
 (0)