Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
First working cut at using Pipfile with Pyup.io (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendonner authored Feb 9, 2018
1 parent 626d674 commit f84df27
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
requirements:
- Pipfile
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
language: python
python: 2.7
install:
- pip install -r requirements.txt
- pip install pipenv
script:
- flake8
- pipenv check
- pipenv check --style .
notifications:
email: [email protected]
40 changes: 25 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
FROM python:2-alpine3.7
FROM ubuntu:xenial

ENV MOZ_HEADLESS=1
ENV DEBIAN_FRONTEND=noninteractive \
MOZ_HEADLESS=1

RUN mkdir /opt
RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN apk --no-cache add \
curl \
firefox@testing \
msttcorefonts-installer
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y bzip2 curl firefox python2.7 \
&& rm -rf /var/lib/apt/lists/*

RUN update-ms-fonts && fc-cache -f
RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py | python2.7 \
&& pip install pipenv

WORKDIR /src
COPY requirements.txt /src
RUN pip install pipenv
RUN pipenv install --system -r requirements.txt --skip-lock --deploy
ENV FIREFOX_VERSION=58.0.1

RUN curl -fsSLo /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2 \
&& apt-get -y purge firefox \
&& rm -rf /opt/firefox \
&& tar -C /opt -xjf /tmp/firefox.tar.bz2 \
&& rm /tmp/firefox.tar.bz2 \
&& mv /opt/firefox /opt/firefox-$FIREFOX_VERSION \
&& ln -fs /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox

ENV GECKODRIVER_VERSION=0.19.1
RUN curl -fsSLo /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz \
Expand All @@ -23,8 +30,11 @@ RUN curl -fsSLo /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/r
&& rm /tmp/geckodriver.tar.gz \
&& mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION \
&& chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION \
&& ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver
&& ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver

COPY . /src
WORKDIR /src
COPY Pipfile /src/
RUN pipenv install --system --skip-lock

COPY . /src
CMD pytest --variables=/variables.json
25 changes: 25 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[dev-packages]



[packages]

BeautifulSoup = "==3.2.1"
"flake8" = "==3.5.0"
"flake8-isort" = "==2.3"
mozlog = "==3.7"
PyPOM = "==1.2.0"
pytest = "==3.4.0"
pytest-metadata = "==1.5.1"
pytest-selenium = "==1.11.4"
pytest-variables = "==1.7.1"
pytest-xdist = "==1.22.0"
requests = "==2.18.4"
pyotp = "==2.2.6"
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

0 comments on commit f84df27

Please sign in to comment.