Skip to content

Commit

Permalink
Circle CI 2.0 (#19)
Browse files Browse the repository at this point in the history
Move to Circle CI 2.0 yaml config
  • Loading branch information
kzielnicki authored Aug 20, 2018
1 parent 46211e9 commit 6482a7b
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2
workflows:
version: 2
test:
jobs:
- test-3.6
- test-2.7
jobs:
test-3.6: &test-template
docker:
- image: circleci/python:3.6
working_directory: ~/repo
environment:
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- checkout
- run: mkdir -p $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
- v1-dependencies-{{ checksum "setup.py" }}
- v1-dependencies-
- run:
name: Install dependencies
command: |
python -m venv venv || virtualenv venv
. venv/bin/activate
pip install pytest
pip install -e .
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "setup.py" }}
- run:
name: Run tests
command: |
. venv/bin/activate
pytest --junitxml=$CIRCLE_TEST_REPORTS/reports/pytest-report.xml
# Save test results
- store_test_results:
path: /tmp/circleci-test-results
- store_artifacts:
path: /tmp/circleci-test-results
test-2.7:
<<: *test-template
docker:
- image: circleci/python:2.7

0 comments on commit 6482a7b

Please sign in to comment.