forked from containernet/containernet
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
executable file
·45 lines (38 loc) · 1.38 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
language: python
sudo: required
matrix:
include:
- dist: bionic
python: 3.7
env: dist="18.04 LTS bionic"
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
virtualenv:
system_site_packages: false
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq vlan
- sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ansible libffi-dev libssl-dev
- cd ansible
# bare metal installation
install:
- travis_wait 60 sudo ansible-playbook -i "localhost," -c local install.yml
before_script:
- cd ..
# run tests
script:
# run unit tests (bare metal)
- travis_wait 60 sudo py.test -v mininet/test/
# build ubuntu-based docker container
- travis_wait 60 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/
# build centos-based docker container
- travis_wait 60 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/
notifications:
email:
on_success: change
on_failure: always