Enable testing in Travis and collecting of coverage history

This commit is contained in:
Alexander Todorov 2018-04-26 10:20:55 +03:00 committed by Alexander Todorov
parent dc348fac25
commit 88139bcc03
4 changed files with 43 additions and 0 deletions

3
.coveragerc Normal file
View File

@ -0,0 +1,3 @@
[paths]
source = .
/lorax/

23
.travis.yml Normal file
View File

@ -0,0 +1,23 @@
sudo: required
language: python
services:
- docker
script:
- make test-in-docker
after_success:
- |
sudo docker create --name results-cont welder/lorax /bin/echo
sudo docker cp results-cont:/lorax/.coverage .coverage.docker
sudo docker rm results-cont
pip install coverage coveralls
coverage combine
coveralls
notifications:
email:
on_failure: change
on_success: never

14
Dockerfile.test Normal file
View File

@ -0,0 +1,14 @@
FROM fedora:rawhide
RUN dnf -y install make libgit2-glib tito python3-pylint \
python3-nose python3-mako python3-flask \
python3-coverage libselinux-python3 sudo \
pykickstart python3-pytoml python3-sphinx \
python3-semantic_version \
anaconda-tui
RUN mkdir /lorax
COPY . /lorax
WORKDIR /lorax
RUN make test

View File

@ -61,6 +61,9 @@ local:
@rm -rf /var/tmp/$(PKGNAME)-$(VERSION) @rm -rf /var/tmp/$(PKGNAME)-$(VERSION)
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz" @echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
test-in-docker:
sudo docker build -t welder/lorax:latest -f Dockerfile.test .
ci: check test ci: check test
.PHONY: docs .PHONY: docs