Skip to content

Commit

Permalink
Towards continuous integration on Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fangohr committed Sep 9, 2017
1 parent 45c9a9c commit f6d31a3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sudo: required

services:
- docker

before_install:
- make build-docker-image

script:
- make ci-docker
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ubuntu:latest seems to be LTS, i.e. 16.04 at the moment
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get install -y python3 python3-pip python3-pytest
# use /io to mount host file system later
RUN mkdir /io
WORKDIR /io
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# makefile used for testing

install:
python3 -m pip install .

test:
python3 -m pytest -v tests

build-docker-image:
docker build -t image .

ci-docker:
# uses normal targets, but executes in container
docker run -v `pwd`:/io image make install test

# make the install part of the testing process ^

0 comments on commit f6d31a3

Please sign in to comment.