-
Notifications
You must be signed in to change notification settings - Fork 397
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
Lint the TravisCI YAML file #1812
Comments
I would be willing to do this in the travis.yml file itself. However, I do not think that we should add it to the validate commands. That would add a new requirement to BLT to have Ruby and the Travis gem both installed. |
git commit -m Fixes
git commit -m Fixes
git commit -m Fixes
git commit -m Fixes
git commit -m Fixes
It does not appear that you can run the Travis linter on Travis itself. There are some memory allocation issues. I would not like to add the Travis gem as a requirement for local builds, so I'm going to close this issue. Okay feel free to open a pull request introducing the feature if you're able to get it working. |
In my observation, Travis CI dies without good warning / notice if the .travis.yml file is malformatted. This is a big problem. So, when I ran across this issue I wanted to comment with the solution I found. You can lint the Here is how to do this:
Now, when you make a commit you should see something like this:
Note: you'll notice the phpcs and twig lint commands are disabled. That was achieved by having this in the blt.yml:
Bonus Note: Customizing Git HooksYou can completely customize the git hooks by doing the following:
Now, you can customize the git-hooks in your |
TravisCI allows you to lint your
.travis.yml
file to ensure that it meets it's standards any contains valid YAML and also valid syntax.Linting the stock BLT supplied
.travis.yml
yieldsSo it seems that it would be good to have this injected somewhere into the build.
Proposed solution
Add a new BLT validate command for validation of the travisci YAML, and ensure this is invoked when a new PR is pushed. More information on how to do this https://docs.travis-ci.com/user/travis-lint/
The text was updated successfully, but these errors were encountered: