forked from containernet/containernet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
executable file
·47 lines (40 loc) · 1.48 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
language: python
sudo: required
matrix:
include:
#- dist: trusty
# env: dist="14.04 LTS trusty"
- dist: xenial
env: dist="16.04 LTS xenial"
- dist: bionic
env: dist="18.04 LTS bionic"
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get -qq update
- sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ansible libffi-dev libssl-dev
- cd ansible
# bare metal installation
install:
- travis_wait 30 sudo ansible-playbook -i "localhost," -c local install.yml
before_script:
- cd ..
# run tests
script:
# run unit tests (bare metal)
- sudo py.test -v mininet/test/test_containernet.py
# build ubuntu-based docker container
- travis_wait 30 docker build -t containernet/containernet:ubuntu .
# run unit tests on ubuntu:xenial-based docker container
- docker run --name containernet -i --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock containernet/containernet:ubuntu py.test -v mininet/test/test_containernet.py
# build centos-based docker container
- travis_wait 30 docker build -t containernet/containernet:centos7 -f Dockerfile.centos .
# run unit tests on centos7-based docker container
- docker run --name containernet -i --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock containernet/containernet:centos7 py.test -v mininet/test/test_containernet.py
notifications:
email:
on_success: change
on_failure: always