Use Travis-CI for basic sanity checks

This patch adds the config file for Travis CI. The config file instructs the
CI to:
* check pep8 errors in PR
* build RPMs in pulled in Fedora builder container
    (docker.io/martbab/freeipa-fedora-builder)

These basic checks should eliminate basic errors that can break the build
itself (formatting errors, Syntax errors/undeclared variables, missing
BuildRequires, broken API.txt, etc.). It does not run any of our
integration/unit tests.

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Martin Babinsky 2016-09-05 10:19:40 +02:00 committed by Martin Basti
parent db55bde15d
commit 37f3ad8867

16
.travis.yml Normal file
View File

@ -0,0 +1,16 @@
services:
- docker
before_install:
- pip install pep8
script:
- >
if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]];
then
git diff origin/${TRAVIS_BRANCH} -U0 | pep8 --diff;
fi
- >
docker run -v $PWD:/freeipa -w /freeipa
martbab/freeipa-fedora-builder:${TRAVIS_BRANCH}-latest
/bin/bash -c 'dnf builddep -y --spec freeipa.spec.in && make rpms'