Skip to content

Commit 7681b51

Browse files
authored
Merge pull request #166 from rohitpaulk/rohitpaulk/cleanup-circleci-config
Cleanup CircleCI config
2 parents 1c20c81 + 84ea6ad commit 7681b51

File tree

2 files changed

+31
-24
lines changed

2 files changed

+31
-24
lines changed

.circleci/config.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defaults:
66
jobs:
77
build:
88
docker:
9-
- image: circleci/python:2.7.15-stretch
9+
- image: circleci/python:2.7
1010
steps:
1111
- checkout
1212
- run: pip install --user .
@@ -23,7 +23,7 @@ jobs:
2323

2424
coverage:
2525
docker:
26-
- image: circleci/python:2.7.15-stretch
26+
- image: circleci/python:2.7
2727
steps:
2828
- checkout
2929
- attach_workspace: { at: . }
@@ -36,36 +36,38 @@ jobs:
3636

3737
snyk:
3838
docker:
39-
- image: circleci/python:2.7.15-stretch
39+
- image: circleci/python:3.8
4040
steps:
4141
- checkout
4242
- attach_workspace: { at: . }
43-
- run: python setup.py egg_info
44-
- run: cp analytics_python.egg-info/requires.txt requirements.txt
45-
- run: pip install --user -r requirements.txt
43+
- run: pip install dephell
44+
- run: dephell deps convert --from=setup.py --to=requirements.txt
4645
- run: curl -sL https://raw.githubusercontent.com/segmentio/snyk_helpers/master/initialization/snyk.sh | sh
4746

48-
test_27:
47+
test_27: &test
4948
docker:
50-
- image: circleci/python:2.7.15-stretch
49+
- image: circleci/python:2.7
5150
steps:
5251
- checkout
53-
- run: pip install --user .
54-
- run: sudo pip install coverage pylint==1.9.3 flake8 mock==3.0.5
52+
- run: pip install --user .[test]
5553
- run:
5654
name: Linting with Flake8
5755
command: |
5856
git diff origin/master..HEAD analytics | flake8 --diff --max-complexity=10 analytics
5957
- run: make test
6058
- run: make e2e_test
6159

62-
test_34: &test_34
60+
test_34:
6361
docker:
64-
- image: circleci/python:3.4.8-jessie-node
62+
- image: circleci/python:3.4
6563
steps:
6664
- checkout
67-
- run: pip install --user .
65+
- run: pip install --user .[test]
66+
67+
# The circleci/python:3.4 image doesn't set PATH correctly, so we need to
68+
# install these by hand with sudo
6869
- run: sudo pip install coverage pylint==1.9.3 flake8 mock==3.0.5
70+
6971
- run:
7072
name: Linting with Flake8
7173
command: |
@@ -74,28 +76,28 @@ jobs:
7476
- run: make e2e_test
7577

7678
test_35:
77-
<<: *test_34
79+
<<: *test
7880
docker:
79-
- image: circleci/python:3.5.5-jessie
81+
- image: circleci/python:3.5
8082

8183
test_36:
82-
<<: *test_34
84+
<<: *test
8385
docker:
84-
- image: circleci/python:3.6.5-jessie
86+
- image: circleci/python:3.6
8587

8688
test_37:
87-
<<: *test_34
89+
<<: *test
8890
docker:
89-
- image: circleci/python:3.7-stretch
91+
- image: circleci/python:3.7
9092

9193
test_38:
92-
<<: *test_34
94+
<<: *test
9395
docker:
94-
- image: circleci/python:3.8-buster
96+
- image: circleci/python:3.8
9597

9698
publish:
9799
docker:
98-
- image: circleci/python:3.6.5-jessie
100+
- image: circleci/python:3.6
99101
steps:
100102
- checkout
101103
- run: sudo pip install twine

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
]
3131

3232
tests_require = [
33-
"mock>=2.0.0"
33+
"mock==2.0.0",
34+
"pylint==1.9.3",
35+
"flake8==3.7.9",
36+
"coverage==4.5.4"
3437
]
3538

3639
setup(
@@ -45,7 +48,9 @@
4548
packages=['analytics', 'analytics.test'],
4649
license='MIT License',
4750
install_requires=install_requires,
48-
tests_require=tests_require,
51+
extras_require={
52+
'test': tests_require
53+
},
4954
description='The hassle-free way to integrate analytics into any python application.',
5055
long_description=long_description,
5156
classifiers=[

0 commit comments

Comments
 (0)