-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from MichaelAquilina/circleci
Migrate to CircleCI 2.0
- Loading branch information
Showing
4 changed files
with
91 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |