goss icon indicating copy to clipboard operation
goss copied to clipboard

ci: add validation with yamllint

Open dklimpel opened this issue 1 year ago • 2 comments

Checklist
  • [x] make test-all (UNIX) passes. CI will also test this
  • [ ] unit and/or integration tests are included (if applicable)
  • [ ] documentation is changed or added (if applicable)

Description of change

#568 adds an yamllint configuration. But it seems not to be used.

This adds a pipeline and fix a lot of issues.


📚 Documentation preview 📚: https://goss--951.org.readthedocs.build/en/951/

dklimpel avatar Jul 13 '24 21:07 dklimpel

Will this fail with files generated by goss. I recall a while back someone reporting goss generated yaml files don't pass yamllint.

Goss uses the go yaml package and doesn't really attempt to manipulate it.

aelsabbahy avatar Aug 29 '24 18:08 aelsabbahy

When validating Go templates, similar problems occur as in:

  • #963

Goss uses the go yaml package and doesn't really attempt to manipulate it.

That is th reason why there is a list of exceptions:

ignore:
  # uses go templates (these are invalid yaml files)
  - integration-tests/goss/goss-service.yaml
  - integration-tests/goss/goss-shared.yaml
  - docs/goss.yaml

What should be next?

  • Close this PR and delete the unsused .yamllint from repo?
  • Solve the known ‘errors’ in the yaml files in a separate PR without automatic validation with the CI?
  • Leave the list of exceptions as it is and continue with this PR? Possibly divide the changes from this PR into smaller PRs
  • Or describe the list of exceptions more globally?
  • Others?

dklimpel avatar Aug 30 '24 06:08 dklimpel