Testing

Project validation is done using Travis CI.

The actual role and playbook testing is performed by the project developers using GitLab CI in a locally hosted development environment.

Travis CI

You can easily run the Travis CI suite on your local fork, by running make test.

The Makefile includes linting with several different tools, building the documentation, and testing the project on a docker image.

Software dependencies

sudo apt install build-essential git graphviz shellcheck \
                 python3-sphinx python3-sphinx-rtd-theme

pip install -U pycodestyle nose2 yamllint ansible-lint reuse

If you intend on running make docker, you also need Docker and a user able to run docker containers.

Installing Docker Community Edition on Debian involves adding their apt repository that corresponds to your distro, as described in the Docker CE Debian installation instructions.

You may also want to check out Docker CE post-installation steps for linux. For our purposes, all you need is to add your user to the docker group:

sudo usermod -aG docker <username>
# log out or reboot for this to take effect.

make test

Runs all tests. This runs on automatically on contributions on github.

make help

Displays all make targets, along with a useful description. :)

make docker

The test code in make test checks if Docker is available, and if not, this particular test is successfully skipped.

Verifies the Dockerfile and checks if Ansible and DebOps run fine inside of a Docker container.

make docs

While working with documentation, it can be useful to only run this bit.

The resulting html files will be in docs/_build/html/.