Skip to content

Commit

Permalink
Merge pull request #417 from Kegbot/mikey/poetry
Browse files Browse the repository at this point in the history
build: switch to poetry (from pipenv)
  • Loading branch information
mik3y authored Dec 24, 2020
2 parents ef3e871 + 85b1797 commit d4fe7c4
Show file tree
Hide file tree
Showing 12 changed files with 2,018 additions and 1,087 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pybuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8

- name: Install dependencies
run: |
pip install pipenv docker-compose
pipenv install --deploy --dev
pip install poetry docker-compose
poetry install -n
- name: Run mysql & redis
run: |
docker-compose -f testdata/test-docker-compose.yml up -d
sleep 10 && ./bin/wait-for-container.sh testdata_mysql_1
- name: pytest
run: KEGBOT_DATABASE_URL=mysql://root:[email protected]:3306/kegbot_dev pipenv run pytest
run: KEGBOT_DATABASE_URL=mysql://root:[email protected]:3306/kegbot_dev poetry run pytest
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ before_install:
- mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

install:
- pip install pipenv
- pipenv install --dev --deploy
- pip install poetry
- poetry install -n

script:
- pipenv run pytest
- poetry run pytest
28 changes: 17 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,27 @@ RUN apk update && \
curl \
libjpeg \
libjpeg-turbo \
openjpeg && \
pip install pipenv

ADD Pipfile Pipfile.lock ./
RUN apk add --no-cache mariadb-connector-c-dev libpq && \
openjpeg \
mariadb-connector-c-dev \
libpq && \
apk add --no-cache --virtual _build-deps \
build-base mariadb-dev postgresql-dev libjpeg-turbo-dev zlib-dev py-gevent libffi-dev && \
pipenv install --deploy --system && \
apk del _build-deps
build-base \
mariadb-dev \
postgresql-dev \
libjpeg-turbo-dev \
zlib-dev \
py-gevent \
libffi-dev

RUN pip install poetry

COPY pyproject.toml poetry.lock ./
ADD pykeg/__init__.py ./pykeg/
RUN poetry config virtualenvs.create false && poetry install -n

ADD bin ./bin
ADD pykeg ./pykeg
ADD setup.py ./
RUN python setup.py develop
RUN bin/kegbot collectstatic -v 0 --noinput
RUN poetry run python bin/kegbot collectstatic --noinput -v 0

ARG GIT_SHORT_SHA="unknown"
ARG VERSION="unknown"
Expand Down
59 changes: 0 additions & 59 deletions Pipfile

This file was deleted.

Loading

0 comments on commit d4fe7c4

Please sign in to comment.