forked from FidelityInternational/djangocms-version-locking
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Circle CI integration (FidelityInternational#60)
Contains failures but merged to ensure that the issue is not compounded.
- Loading branch information
Showing
5 changed files
with
208 additions
and
2 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,7 @@ | ||
ARG PYTHON_VERSION=3.6 | ||
FROM circleci/python:$PYTHON_VERSION | ||
|
||
WORKDIR /home/circleci/app/ | ||
COPY . /home/circleci/app/ | ||
RUN sudo chown -R circleci:circleci . | ||
RUN sudo pip install tox |
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,146 @@ | ||
version: 2.0 | ||
|
||
py34default: &py34default | ||
docker: | ||
- image: circleci/python:3.4 | ||
steps: | ||
- setup_remote_docker: | ||
docker_layer_caching: false | ||
- checkout | ||
- attach_workspace: | ||
at: /tmp/images | ||
- run: docker load -i /tmp/images/py34.tar || true | ||
- run: docker run py34 tox -e $CIRCLE_STAGE | ||
|
||
py35default: &py35default | ||
docker: | ||
- image: circleci/python:3.5 | ||
steps: | ||
- setup_remote_docker: | ||
docker_layer_caching: false | ||
- checkout | ||
- attach_workspace: | ||
at: /tmp/images | ||
- run: docker load -i /tmp/images/py35.tar || true | ||
- run: docker run py35 tox -e $CIRCLE_STAGE | ||
|
||
py36default: &py36default | ||
docker: | ||
- image: circleci/python:3.6 | ||
steps: | ||
- setup_remote_docker: | ||
docker_layer_caching: false | ||
- checkout | ||
- attach_workspace: | ||
at: /tmp/images | ||
- run: docker load -i /tmp/images/py36.tar || true | ||
- run: docker run py36 tox -e $CIRCLE_STAGE | ||
|
||
py34_requires: &py34_requires | ||
requires: | ||
- py34_base | ||
|
||
py35_requires: &py35_requires | ||
requires: | ||
- py35_base | ||
|
||
py36_requires: &py36_requires | ||
requires: | ||
- py36_base | ||
|
||
jobs: | ||
py34_base: | ||
docker: | ||
- image: circleci/python:3.4 | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: false | ||
- run: docker build -f .circleci/Dockerfile --build-arg PYTHON_VERSION=3.4 -t py34 . | ||
- run: mkdir images | ||
- run: docker save -o images/py34.tar py34 | ||
- persist_to_workspace: | ||
root: images | ||
paths: py34.tar | ||
py35_base: | ||
docker: | ||
- image: circleci/python:3.5 | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: false | ||
- run: docker build -f .circleci/Dockerfile --build-arg PYTHON_VERSION=3.5 -t py35 . | ||
- run: mkdir images | ||
- run: docker save -o images/py35.tar py35 | ||
- persist_to_workspace: | ||
root: images | ||
paths: py35.tar | ||
py36_base: | ||
docker: | ||
- image: circleci/python:3.6 | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: false | ||
- run: docker build -f .circleci/Dockerfile --build-arg PYTHON_VERSION=3.6 -t py36 . | ||
- run: mkdir images | ||
- run: docker save -o images/py36.tar py36 | ||
- persist_to_workspace: | ||
root: images | ||
paths: py36.tar | ||
|
||
flake8: | ||
<<: *py35default | ||
isort: | ||
<<: *py35default | ||
py34-dj111-sqlite-cms40: | ||
<<: *py34default | ||
py35-dj111-sqlite-cms40: | ||
<<: *py35default | ||
py36-dj111-sqlite-cms40: | ||
<<: *py36default | ||
py35-dj20-sqlite-cms40: | ||
<<: *py35default | ||
py36-dj20-sqlite-cms40: | ||
<<: *py36default | ||
py35-dj21-sqlite-cms40: | ||
<<: *py35default | ||
py36-dj21-sqlite-cms40: | ||
<<: *py36default | ||
|
||
####################### | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- py34_base | ||
- py35_base | ||
- py36_base | ||
- flake8: | ||
requires: | ||
- py35_base | ||
- isort: | ||
requires: | ||
- py35_base | ||
- py34-dj111-sqlite-cms40: | ||
requires: | ||
- py34_base | ||
- py35-dj111-sqlite-cms40: | ||
requires: | ||
- py35_base | ||
- py36-dj111-sqlite-cms40: | ||
requires: | ||
- py36_base | ||
- py35-dj20-sqlite-cms40: | ||
requires: | ||
- py35_base | ||
- py36-dj20-sqlite-cms40: | ||
requires: | ||
- py36_base | ||
- py35-dj21-sqlite-cms40: | ||
requires: | ||
- py35_base | ||
- py36-dj21-sqlite-cms40: | ||
requires: | ||
- py36_base |
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,4 +1,8 @@ | ||
# test libraries | ||
coverage | ||
pyflakes>=2.1.1 | ||
flake8 | ||
isort | ||
mock | ||
djangocms_helper | ||
factory-boy |
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,37 @@ | ||
[tox] | ||
envlist = | ||
flake8 | ||
isort | ||
py{34,35,36}-dj{111,20}-sqlite-cms40 | ||
py{35,36}-dj21-sqlite-cms40 | ||
|
||
skip_missing_interpreters=True | ||
|
||
[testenv] | ||
deps = | ||
-r{toxinidir}/tests/requirements.txt | ||
|
||
dj111: Django>=1.11,<2.0 | ||
dj20: Django>=2.0,<2.1 | ||
dj21: Django>=2.1,<2.2 | ||
|
||
cms40: https://github.com/divio/django-cms/archive/release/4.0.x.zip | ||
|
||
basepython = | ||
py34: python3.4 | ||
py35: python3.5 | ||
py36: python3.6 | ||
|
||
commands = | ||
{envpython} --version | ||
{env:COMMAND:coverage} erase | ||
{env:COMMAND:coverage} run setup.py test | ||
{env:COMMAND:coverage} report | ||
|
||
[testenv:flake8] | ||
commands = flake8 | ||
basepython = python3.5 | ||
|
||
[testenv:isort] | ||
commands = isort --recursive --check-only --diff {toxinidir} | ||
basepython = python3.5 |