Skip to content

Commit 981049c

Browse files
committed
adding cci build and publish to this project
1 parent cab5369 commit 981049c

File tree

3 files changed

+81
-20
lines changed

3 files changed

+81
-20
lines changed

.circleci/config.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
version: 2.1
2+
3+
orbs:
4+
ghpr: narrativescience/[email protected]
5+
6+
commands:
7+
install-deps:
8+
description: Install dependencies and initialize pre-commit hooks
9+
steps:
10+
- run:
11+
name: Install dependencies
12+
command: |
13+
pip install flit
14+
15+
jobs:
16+
test:
17+
docker:
18+
- image: circleci/python:3.5-jessie-browsers
19+
steps:
20+
- checkout
21+
- run:
22+
name: 'Setup virtual env'
23+
command: |
24+
python3 -m venv venv
25+
source venv/bin/activate
26+
pip install -U pip setuptools
27+
pip install .[dev]
28+
- run:
29+
name: 'run tests'
30+
command: |
31+
source venv/bin/activate
32+
python -m unittest
33+
test-build:
34+
docker:
35+
- image: circleci/python:3.6
36+
steps:
37+
- ghpr/build-prospective-branch
38+
- install-deps
39+
- run:
40+
name: Run commit hooks
41+
command: |
42+
pre-commit run \
43+
--source "origin/${GITHUB_PR_BASE_BRANCH}" \
44+
--origin "origin/${CIRCLE_BRANCH}" \
45+
--show-diff-on-failure
46+
- run: flit build
47+
- ghpr/post-pr-comment:
48+
comment: Tests failed!
49+
when: on_fail
50+
publish:
51+
docker:
52+
- image: circleci/python:3.6
53+
steps:
54+
- checkout
55+
- run: pip install flit
56+
- run: flit build
57+
- run: flit publish
58+
59+
workflows:
60+
pull_request:
61+
jobs:
62+
- test:
63+
filters:
64+
branches:
65+
ignore:
66+
- master
67+
- test-build:
68+
filters:
69+
branches:
70+
ignore:
71+
- master
72+
publish:
73+
jobs:
74+
- publish:
75+
filters:
76+
tags:
77+
only: /v[0-9]+(\.[0-9]+)*/
78+
branches:
79+
ignore: /.*/

circle.yml

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

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
"python-dateutil==2.6.1",
1616
"msgpack-python",
1717
"requests==2.24.0",
18-
])
18+
]
19+
)

0 commit comments

Comments
 (0)