Skip to content

Commit 32f2c58

Browse files
committed
Starting switch to poetry
1 parent 96f9492 commit 32f2c58

File tree

11 files changed

+1114
-45
lines changed

11 files changed

+1114
-45
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
env

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,4 @@ yarn-error.log
7676
# System Files
7777
.DS_Store
7878
Thumbs.db
79+
env

.gitlab-ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
1-
image: python:3.6
1+
image: python:3.6-slim
2+
variables:
3+
POETRY_VERSION: 1.1.4
4+
POETRY_VIRTUALENVS_CREATE: "false"
5+
PIP_DISABLE_PIP_VERSION_CHECK: "on"
26

37
test_py36:
48
cache:
59
paths:
610
- ~/.cache/pip/
711
script:
8-
- pip install tox
12+
- pip install tox "poetry==$POETRY_VERSION"
913
- tox
1014

1115
test_py37:
1216
image: python:3.7
1317
script:
14-
- pip install tox
18+
- pip install --upgrade pip; pip install zipp
19+
- pip install tox "poetry==$POETRY_VERSION"
1520
- tox -c tox.py37.ini
1621

1722
test_py38:
1823
image: python:3.8-slim
1924
script:
20-
- pip install tox
25+
- pip install tox "poetry==$POETRY_VERSION"
2126
- tox -c tox.py38.ini
2227

2328
test_coverage:
2429
script:
25-
- pip install -e . -r requirements.txt
26-
- pip install -e . -r requirements-dev.txt
30+
- pip install coverage "poetry==$POETRY_VERSION"
31+
- poetry install
2732
- coverage run --source='.' manage.py test --noinput -v 3
2833
- coverage report --skip-covered | grep TOTAL
2934

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM python:3.8-slim
2-
ENV PYTHONUNBUFFERED 1
2+
ENV PYTHONUNBUFFERED=1 \
3+
POETRY_VERSION=1.1.4 \
4+
POETRY_VIRTUALENVS_CREATE=false \
5+
PIP_DISABLE_PIP_VERSION_CHECK=on
6+
37
RUN mkdir /code
48
WORKDIR /code
5-
ADD requirements.txt /code/
6-
ADD requirements-dev.txt /code/
7-
ADD setup.py /code/
8-
RUN pip install -e . -r requirements.txt
9-
RUN pip install -e . -r requirements-dev.txt
9+
RUN pip install "poetry==$POETRY_VERSION"
10+
COPY poetry.lock pyproject.toml /code/
11+
RUN poetry install --no-interaction --no-ansi
1012
ADD . /code/

0 commit comments

Comments
 (0)