forked from cobbler/cobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (48 loc) · 1.86 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
dist: xenial
language: generic
services:
- docker
branches:
only:
- master
addons:
apt:
packages:
- python3
- python3-pip
jobs:
include:
- stage: lint
name: "Linter"
script:
- pip3 install pyflakes pycodestyle
- pyflakes *.py cobbler/*.py cobbler/modules/*.py cobbler/web/*.py cobbler/web/templatetags/*.py bin/cobbler* bin/*.py web/cobbler.wsgi
- pycodestyle -r --ignore E501,E402,E722,W504 *.py cobbler/*.py cobbler/modules/*.py cobbler/web/*.py cobbler/web/templatetags/*.py bin/cobbler* bin/*.py web/cobbler.wsgi
- stage: testing
name: "Run unit tests"
script:
- docker build -t cobbler .
- docker run -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /test_dir:${PWD} --name cobbler cobbler
- sleep 10
- docker logs cobbler
- COMMIT_SHA=`git rev-parse HEAD`
- docker exec -u 0 -it cobbler bash -c "pytest --cov=./cobbler && codecov --token=1064928c-6477-41be-9ac2-7ce5e6d1fd8b --commit=${COMMIT_SHA}"
- stage: rpms
name: "Build CentOS 7 RPMs"
script: ./tests/build-and-install-rpms.sh el7 dockerfiles/CentOS7.dockerfile
- stage: rpms
name: "Build CentOS 8 RPMs"
script: ./tests/build-and-install-rpms.sh el8 dockerfiles/CentOS8.dockerfile
- stage: rpms
name: "Build Fedora 31 RPMs"
script: ./tests/build-and-install-rpms.sh fc31 dockerfiles/Fedora31.dockerfile
- stage: debs
name: "Build Debian 10 DEBs"
script: ./tests/build-and-install-debs.sh deb10 dockerfiles/Debian10.dockerfile
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/988ae7d365d12a2bf093
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always