Add self test that can be run by travis

This commit is contained in:
Pierre Schmitz 2017-04-23 15:36:09 +02:00
parent 4aa93742cb
commit 20739c17b4
2 changed files with 13 additions and 0 deletions

9
.travis.yml Normal file
View file

@ -0,0 +1,9 @@
sudo: required
language: bash
services:
- docker
script:
- make ci-test

View file

@ -21,6 +21,10 @@ docker-image-test: docker-image
# Ensure that the image does not include a private key # Ensure that the image does not include a private key
! docker run --rm pierres/archlinux pacman-key --lsign-key pierre@archlinux.de ! docker run --rm pierres/archlinux pacman-key --lsign-key pierre@archlinux.de
ci-test:
docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD):/app -w /app pierres/archlinux \
sh -c 'pacman -Sy --noconfirm make devtools docker && make docker-image-test'
docker-push: docker-image-test docker-push: docker-image-test
docker login -u $(DOCKER_USER) docker login -u $(DOCKER_USER)
docker push $(DOCKER_USER)/$(DOCKER_IMAGE) docker push $(DOCKER_USER)/$(DOCKER_IMAGE)