1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-23 01:52:21 +00:00

Makefile for automated testing (no more drone)

This commit is contained in:
J. Fernando Sánchez
2016-09-20 20:55:59 +02:00
parent 0454fb1afe
commit 5d5de0bc50
8 changed files with 43 additions and 3 deletions

29
Makefile Normal file
View File

@@ -0,0 +1,29 @@
PYVERSIONS=2.7 3.4
NAME=senpy
REPO=gsiupm
VERSION=$(shell cat $(NAME)/VERSION)
all: build run
dockerfiles: $(addprefix Dockerfile-,$(PYVERSIONS))
Dockerfile-%: Dockerfile.template
sed "s/{{PYVERSION}}/$*/" Dockerfile.template > Dockerfile-$*
build: $(addprefix build-, $(PYVERSIONS))
build-%: Dockerfile-%
docker build -t '$(REPO)/$(NAME):$(VERSION)-python$*' -f Dockerfile-$* .;
test: $(addprefix test-,$(PYVERSIONS))
test-%: build-%
docker run --rm -w /usr/src/app/ --entrypoint=/usr/local/bin/python -ti '$(REPO)/$(NAME):$(VERSION)-python$*' setup.py test ;
test_pip-%:
docker run --rm -ti python:$* pip -q install senpy ;
test_pip: $(addprefix test_pip-,$(PYVERSIONS))
.PHONY: test test-% build-% build test test_pip