ansible-minecraft
ansible-minecraft copied to clipboard
Add linting to CI tests
From conversation in #19, add playbook and python linting to the CI checks. Ben suggested using tox and flake8, providing this example tox config:
[tox]
envlist = py27,py35,py36
[testenv]
deps =
flake8
command = flake8 library/
I'll get started on this later today.
On the topic of CI, have you given any thought to Molecule? It does linting on python and ansible, supports tox, and is fairly straightforward.
I use it on a number of private repos and enjoy it. Here is an example ansible role with molecule. https://github.com/joshuacherry/example-ansible-role
I personally haven't, but it sounds pretty convenient. I'm totally down to give it a shot though! @benwebber do you have any thoughts on using Molecule?
I really like the integration with testinfra. pytest is a joy to use and testinfra's Docker fixture is brilliant.
I don't really like the boilerplate it requires, but in the past year or so it's become the standard Docker test harness.
Overall I'm in favour if we can replicate the current test matrix using Molecule.
I got molecule all set for vanilla minecraft yesterday, but it's looking like it'll take a bit more to get it working with tox (granted, this is my first time working with molecule).
Personally, I'd prefer the path of least resistance since the goal is just to validate the library files. I think we should stick with the tox+flake8 plan since it's quick and easy, and we can reconsider molecule in the future if needed.