-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Towards continuous integration on Travis CI
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ^ |