Skip to content

Commit

Permalink
Fix the steps in circleci/config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jul 2, 2018
1 parent 39ef217 commit 6bf13cc
Showing 1 changed file with 44 additions and 47 deletions.
91 changes: 44 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,52 @@
version: 2

my-steps: &steps
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
mkdir -p ./venv
virtualenv ./venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

- run:
name: run script
# make sure the script runs, set a 60s timeout
command: |
. venv/bin/activate
python noisy.py --config config.json --timeout 60
- store_artifacts:
path: test-reports
destination: test-reports

jobs:
Python_2.7:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:2.7
working_directory: ~/repo
steps: *steps
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:2.7

working_directory: ~/repo

steps: &steps
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
mkdir -p ./venv
virtualenv ./venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

- run:
name: run script
# make sure the script runs, set a 60s timeout
command: |
. venv/bin/activate
python noisy.py --config config.json --timeout 60
- store_artifacts:
path: test-reports
destination: test-reports

Python_3.6:
build:
docker:
- image: circleci/python:3.6
working_directory: ~/repo
steps: *steps
docker:
- image: circleci/python:3.6
working_directory: ~/repo
steps: *steps

workflows:
version: 2
Expand Down

0 comments on commit 6bf13cc

Please sign in to comment.