Skip to content

Commit

Permalink
Starting switch to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
bufke committed Oct 25, 2020
1 parent 96f9492 commit 32f2c58
Show file tree
Hide file tree
Showing 11 changed files with 1,114 additions and 45 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
env
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ yarn-error.log
# System Files
.DS_Store
Thumbs.db
env
17 changes: 11 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
image: python:3.6
image: python:3.6-slim
variables:
POETRY_VERSION: 1.1.4
POETRY_VIRTUALENVS_CREATE: "false"
PIP_DISABLE_PIP_VERSION_CHECK: "on"

test_py36:
cache:
paths:
- ~/.cache/pip/
script:
- pip install tox
- pip install tox "poetry==$POETRY_VERSION"
- tox

test_py37:
image: python:3.7
script:
- pip install tox
- pip install --upgrade pip; pip install zipp
- pip install tox "poetry==$POETRY_VERSION"
- tox -c tox.py37.ini

test_py38:
image: python:3.8-slim
script:
- pip install tox
- pip install tox "poetry==$POETRY_VERSION"
- tox -c tox.py38.ini

test_coverage:
script:
- pip install -e . -r requirements.txt
- pip install -e . -r requirements-dev.txt
- pip install coverage "poetry==$POETRY_VERSION"
- poetry install
- coverage run --source='.' manage.py test --noinput -v 3
- coverage report --skip-covered | grep TOTAL

Expand Down
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM python:3.8-slim
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1 \
POETRY_VERSION=1.1.4 \
POETRY_VIRTUALENVS_CREATE=false \
PIP_DISABLE_PIP_VERSION_CHECK=on

RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
ADD requirements-dev.txt /code/
ADD setup.py /code/
RUN pip install -e . -r requirements.txt
RUN pip install -e . -r requirements-dev.txt
RUN pip install "poetry==$POETRY_VERSION"
COPY poetry.lock pyproject.toml /code/
RUN poetry install --no-interaction --no-ansi
ADD . /code/
Loading

0 comments on commit 32f2c58

Please sign in to comment.