Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linting to CI tests #20

Open
brahmlower opened this issue Dec 12, 2017 · 5 comments
Open

Add linting to CI tests #20

brahmlower opened this issue Dec 12, 2017 · 5 comments
Assignees

Comments

@brahmlower
Copy link
Contributor

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/
@brahmlower brahmlower self-assigned this Dec 12, 2017
@brahmlower
Copy link
Contributor Author

I'll get started on this later today.

@joshuacherry
Copy link
Contributor

joshuacherry commented Dec 12, 2017

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

@brahmlower
Copy link
Contributor Author

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?

@benwebber
Copy link
Collaborator

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.

@brahmlower
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants