Enable testing in Travis and collecting of coverage history
This commit is contained in:
parent
dc348fac25
commit
88139bcc03
3
.coveragerc
Normal file
3
.coveragerc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[paths]
|
||||||
|
source = .
|
||||||
|
/lorax/
|
23
.travis.yml
Normal file
23
.travis.yml
Normal 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
14
Dockerfile.test
Normal 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
|
3
Makefile
3
Makefile
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user