Skip to content

Commit

Permalink
Merge pull request #136 from MichaelAquilina/circleci
Browse files Browse the repository at this point in the history
Migrate to CircleCI 2.0
  • Loading branch information
MichaelAquilina committed Jul 25, 2018
2 parents e3545fa + 03fca5c commit fa54b56
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 35 deletions.
81 changes: 81 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
version: 2

test: &test
steps:
- checkout
- run:
name: install less pager dependency
command: apt-get update && apt-get install -y less
- run:
name: install python dependencies
command: pip install -r requirements.txt -r dev-requirements.txt
- run:
name: run pytest
command: |
mkdir -p /tmp/test-results
PYTHONPATH="." pytest --cov=s4 --cov=tests --cov-report xml --junitxml=/tmp/test-results/pytest-results.xml
# Only upload for python 3.7 instead of uploading multiple
if [[ "$CIRCLE_JOB" == "test-3.7" ]]; then
bash <(curl -s https://codecov.io/bash)
fi
- store_test_results:
path: /tmp/test-results


jobs:
lint:
docker:
- image: "python:3.7-stretch"
steps:
- checkout
- run:
name: run linter
command: |
pip install flake8
flake8 s4 tests
- run:
name: check black formatting
command: |
pip install black
black s4 tests --check
- run:
name: version lint
command: |
pip install .
test "$(s4 version)" = "$(git tag --sort "v:refname" | tail -1)"
grep "$(s4 version)" CHANGELOG.rst
test-3.7:
docker:
- image: "python:3.7-stretch"
<<: *test

test-3.6:
docker:
- image: "python:3.6-stretch"
<<: *test

test-3.5:
docker:
- image: "python:3.5-stretch"
<<: *test

test-3.4:
docker:
- image: "python:3.4-stretch"
<<: *test


workflows:
version: 2
s4_test:
jobs:
- lint
- test-3.4
- test-3.5
- test-3.6
- test-3.7
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
S4 = S3 Syncer
==============

|TravisCI| |CodeCov| |Snyk| |PyPi| |GPLv3|
|CircleCI| |CodeCov| |Snyk| |PyPi| |GPLv3|

Fast and cheap synchronisation of files using `Amazon
S3 <https://aws.amazon.com/s3/>`__.
Expand Down Expand Up @@ -215,8 +215,8 @@ And then to run the tests locally:

tox

.. |TravisCI| image:: https://travis-ci.org/MichaelAquilina/S4.svg?branch=master
:target: https://travis-ci.org/MichaelAquilina/S4
.. |CircleCI| image:: https://circleci.com/gh/MichaelAquilina/S4.svg?style=svg
:target: https://circleci.com/gh/MichaelAquilina/S4

.. |PyPi| image:: https://badge.fury.io/py/s4.svg
:target: https://badge.fury.io/py/s4
Expand Down
18 changes: 7 additions & 11 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
Faker==0.8.12
flake8==3.5.0
flake8-import-order==0.17.1
freezegun==0.3.10
ipdb==0.11.0
mock==2.0.0
moto==1.3.0
pytest==3.4.2
pytest-cov==2.5.1
pytest-timeout==1.2.1
pytz==2016.6.1
Faker
freezegun
moto
pytest
pytest-cov
pytest-timeout
pytz

0 comments on commit fa54b56

Please sign in to comment.