Skip to content

Commit 2965a0b

Browse files
authored
Fix travis to use docker build
1 parent a33234c commit 2965a0b

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
language: python
22
python:
33
- "3.6"
4+
services:
5+
- docker
6+
before_install:
7+
- docker build -t trdg .
48
install:
5-
- pip install -r requirements-hw.txt
69
- pip install codecov
7-
- python3 setup.py install
810
script:
9-
- python3 tests.py
10-
- coverage run tests.py
11+
- docker run -v $(pwd):/app/ -t trdg:latest coverage run tests.py
1112
- codecov

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# We use Ubuntu as base image
2-
FROM ubuntu:18.04
2+
FROM ubuntu
33

44
WORKDIR /app
55

@@ -24,11 +24,11 @@ RUN apt-get update \
2424
# Set the locale
2525
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
2626
locale-gen
27-
ENV LANG en_US.UTF-8
28-
ENV LANGUAGE en_US:en
29-
ENV LC_ALL en_US.UTF-8
27+
ENV LANG en_US.UTF-8
28+
ENV LANGUAGE en_US:en
29+
ENV LC_ALL en_US.UTF-8
3030

31-
COPY . /app
31+
COPY . /app/
3232

3333
RUN git clone https://github.com/python-pillow/Pillow.git \
3434
&& cd Pillow \
@@ -37,4 +37,5 @@ RUN git clone https://github.com/python-pillow/Pillow.git \
3737

3838
RUN python3 setup.py install
3939
RUN pip3 install -r requirements-hw.txt
40+
RUN pip3 install codecov
4041

0 commit comments

Comments
 (0)