Skip to content

Commit

Permalink
Merge pull request segmentio#166 from rohitpaulk/rohitpaulk/cleanup-c…
Browse files Browse the repository at this point in the history
…ircleci-config

Cleanup CircleCI config
  • Loading branch information
lubird authored Apr 17, 2020
2 parents 1c20c81 + 84ea6ad commit 7681b51
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
46 changes: 24 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defaults:
jobs:
build:
docker:
- image: circleci/python:2.7.15-stretch
- image: circleci/python:2.7
steps:
- checkout
- run: pip install --user .
Expand All @@ -23,7 +23,7 @@ jobs:

coverage:
docker:
- image: circleci/python:2.7.15-stretch
- image: circleci/python:2.7
steps:
- checkout
- attach_workspace: { at: . }
Expand All @@ -36,36 +36,38 @@ jobs:

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

test_27:
test_27: &test
docker:
- image: circleci/python:2.7.15-stretch
- image: circleci/python:2.7
steps:
- checkout
- run: pip install --user .
- run: sudo pip install coverage pylint==1.9.3 flake8 mock==3.0.5
- run: pip install --user .[test]
- run:
name: Linting with Flake8
command: |
git diff origin/master..HEAD analytics | flake8 --diff --max-complexity=10 analytics
- run: make test
- run: make e2e_test

test_34: &test_34
test_34:
docker:
- image: circleci/python:3.4.8-jessie-node
- image: circleci/python:3.4
steps:
- checkout
- run: pip install --user .
- run: pip install --user .[test]

# The circleci/python:3.4 image doesn't set PATH correctly, so we need to
# install these by hand with sudo
- run: sudo pip install coverage pylint==1.9.3 flake8 mock==3.0.5

- run:
name: Linting with Flake8
command: |
Expand All @@ -74,28 +76,28 @@ jobs:
- run: make e2e_test

test_35:
<<: *test_34
<<: *test
docker:
- image: circleci/python:3.5.5-jessie
- image: circleci/python:3.5

test_36:
<<: *test_34
<<: *test
docker:
- image: circleci/python:3.6.5-jessie
- image: circleci/python:3.6

test_37:
<<: *test_34
<<: *test
docker:
- image: circleci/python:3.7-stretch
- image: circleci/python:3.7

test_38:
<<: *test_34
<<: *test
docker:
- image: circleci/python:3.8-buster
- image: circleci/python:3.8

publish:
docker:
- image: circleci/python:3.6.5-jessie
- image: circleci/python:3.6
steps:
- checkout
- run: sudo pip install twine
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
]

tests_require = [
"mock>=2.0.0"
"mock==2.0.0",
"pylint==1.9.3",
"flake8==3.7.9",
"coverage==4.5.4"
]

setup(
Expand All @@ -45,7 +48,9 @@
packages=['analytics', 'analytics.test'],
license='MIT License',
install_requires=install_requires,
tests_require=tests_require,
extras_require={
'test': tests_require
},
description='The hassle-free way to integrate analytics into any python application.',
long_description=long_description,
classifiers=[
Expand Down

0 comments on commit 7681b51

Please sign in to comment.