Skip to content

Commit

Permalink
Move test workflow to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jadinm committed Dec 10, 2022
1 parent 5fab96c commit 65f617b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test IPMininet
on: [ push, pull_request ]

jobs:
install_and_run_test:
name: Install and test IPMininet
runs-on: ubuntu-20.04
steps:
- name: Checkout the event commit
uses: actions/checkout@v2
- name: Install IPMininet in dev mode
run: |
sudo pip install -e .
sudo python -m ipmininet.install -a
- name: Run tests
run: |
sudo pip install pytest pytest-cov
sudo pytest --cov-config=.coveragerc --cov=ipmininet/ --cov-branch -v --cov-report term --cov-report lcov:lcov.info -v ipmininet
- uses: romeovs/[email protected]
with:
lcov-file: lcov.info
- name: Run doc tests
run: |
cd docs
pip install -r requirements.txt
printf '' | sudo make doctest
cat docs/_build/doctest/output.txt
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# IPMininet
[![Pypi Version](https://img.shields.io/pypi/v/ipmininet.svg)](https://pypi.python.org/pypi/ipmininet/)
[![Build Status](https://jenkins-mininet.info.ucl.ac.be/buildStatus/icon?job=ipmininet%2Fpythonversion%3Dipmininet-py37%2Ctestname%3Dunittest&subject=Python3.7)](https://jenkins-mininet.info.ucl.ac.be/job/ipmininet/pythonversion=ipmininet-py37,testname=unittest)
[![Build Status](https://github.com/cnp3/ipmininet/actions/workflows/test/badge.svg)](https://github.com/cnp3/ipmininet/actions/workflows/test/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/ipmininet/badge/?version=latest)](http://ipmininet.readthedocs.io/?badge=latest)
[![Build Status](https://jenkins-mininet.info.ucl.ac.be/buildStatus/icon?job=ipmininet%2Fpythonversion%3Dipmininet-py37%2Ctestname%3Ddoctest&subject=doc%20examples)](https://jenkins-mininet.info.ucl.ac.be/job/ipmininet/pythonversion=ipmininet-py37,testname=doctest)
[![Code Coverage](https://img.shields.io/jenkins/coverage/cobertura/https/jenkins-mininet.info.ucl.ac.be/job/ipmininet/pythonversion=ipmininet-py37,testname=unittest.svg)](https://jenkins-mininet.info.ucl.ac.be/job/ipmininet/pythonversion=ipmininet-py37,testname=unittest/cobertura)


This is a python library, extending [Mininet](http://mininet.org), in order
to support emulation of (complex) IP networks. As such it provides new classes,
such as Routers, auto-configures all properties not set by the user, such as
such as Routers, autoconfigures all properties not set by the user, such as
IP addresses or router configuration files, ...

The latest user documentation is available on
Expand Down
11 changes: 11 additions & 0 deletions ipmininet/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[run]
omit =
*/docs/*
*/tests/*
*/util/*
*/install/*
*/setup.py
*/venv/*
*/templates/*
*_mako
*/.eggs/*
2 changes: 1 addition & 1 deletion ipmininet/install/build_openr-rc-20190419-11514.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -exo pipefail
### Install packages for Debian-based OS ###

apt-get update && apt-get install -yq autoconf-archive bison build-essential cmake curl flex git gperf joe libboost-all-dev libcap-dev libdouble-conversion-dev libevent-dev libgflags-dev libgoogle-glog-dev libkrb5-dev libpcre3-dev libpthread-stubs0-dev libnuma-dev libsasl2-dev libsnappy-dev libsqlite3-dev libssl-dev libtool netcat-openbsd pkg-config sudo unzip wget python3-venv python-setuptools python3-setuptools python-pip python3-pip ccache
apt-get update && apt-get install -yq autoconf-archive bison build-essential cmake curl flex git gperf joe libboost-all-dev libcap-dev libdouble-conversion-dev libevent-dev libgflags-dev libgoogle-glog-dev libkrb5-dev libpcre3-dev libpthread-stubs0-dev libnuma-dev libsasl2-dev libsnappy-dev libsqlite3-dev libssl-dev libtool netcat-openbsd pkg-config sudo unzip wget python3-venv python-setuptools python3-setuptools python3-pip ccache
apt-get install -yq gcc-'5' g++-'5'
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-'5' 40 --slave /usr/bin/g++ g++ /usr/bin/g++-'5'
update-alternatives --config gcc
Expand Down

0 comments on commit 65f617b

Please sign in to comment.