Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 104 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,107 @@
#
version: 2
jobs:
build-test-python36:
python27:
docker:
- image: circleci/python:2.7.16

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:9.6.5-alpine-ram
- image: circleci/mysql:5.5.62-ram
- image: circleci/redis:5.0.4
- image: rabbitmq:3.5.4

working_directory: ~/repo

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: |
rm -rf venv
export PATH=/home/circleci/.local/bin:$PATH
pip install --user -U pip setuptools virtualenv
virtualenv --python=python2.7 --always-copy venv
. venv/bin/activate
pip install -U pip
python setup.py install_egg_info
pip install -r requirements-test.txt

- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

- run:
name: run tests
command: |
. venv/bin/activate
python runtests.py

- store_artifacts:
path: test-reports
destination: test-reports

python35:
docker:
- image: circleci/python:3.5.6

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:9.6.5-alpine-ram
- image: circleci/mysql:8.0.16
- image: circleci/redis:5.0.4
- image: rabbitmq:3.5.4

working_directory: ~/repo

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: |
python -m venv venv
. venv/bin/activate
pip install -U pip
python setup.py install_egg_info
pip install -r requirements.txt
pip install -r requirements-test.txt

- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

- run:
name: run tests
command: |
. venv/bin/activate
python runtests.py

- store_artifacts:
path: test-reports
destination: test-reports

python36:
docker:
- image: circleci/python:3.6.8

Expand Down Expand Up @@ -56,4 +156,6 @@ workflows:
version: 2
build:
jobs:
- build-test-python36
- python27
- python35
- python36