vigeeking / homeAutomation

My goal is to create a pipeline that is built exclusively with tools I either already know, or am only learning because they provide added value to the project
https://github.com/vigeeking/homeAutomation
0 stars 0 forks source link

Add testing #63

Open vigeeking opened 4 years ago

vigeeking commented 4 years ago

Since I'm now running in a prod environment, I've noticed a couple of times that I've made oversights in code pushes. I would like to have more confidence that if I push to master, I'm not going to have to push a bugfix shortly after because of a whitespace issue with yaml or a unsaved (and then therefore unpushed) change.

@msaperst and @jwhollingsworth may have some thoughts on how to automate this process. I'm thinking about starting a workflow that would start with a merge request, and would then run some basic linting and testing before allowing the merge to go through. I've done this at a high level before, but never on my own, so any tips/suggestion/insight would be appreciated.

vigeeking commented 4 years ago

from Justin: Whenever you wanted to add in that, I can help out. Otherwise, you can add yamllint and yamale as a couple tools to look into. The first enforces code style (max characters per line, indentation, etc), the second enforces a schema (like it must have a xyz field that is a string)

vigeeking commented 4 years ago

https://github.com/23andMe/Yamale
https://github.com/adrienverge/yamllint
there are probably github actions that use them

jwhollingsworth commented 4 years ago

GitHub recently released a super linter action that includes yamllint, along with a bunch of other ones https://github.com/github/super-linter