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

[WIP] - feat(CI): add a GitHub action to lint the Markdown and YAML files. #361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbampton
Copy link
Member

Add a basic markdownlint config file.
Add a yamllint config file.
Lint both Markdown and YAML files.

@jbampton jbampton force-pushed the lint-markdown-and-yaml branch 2 times, most recently from 3aabd3d to 162e87d Compare September 15, 2020 12:47
@jbampton
Copy link
Member Author

Hey @martin-g I have moved both config files to the .github folder.

If we put them in the .github/workflows/ folder, GitHub will think they are both workflows.

@martin-g
Copy link
Member

Thanks! Looks better now!
Let's see what others think about this linters.

@jbampton
Copy link
Member Author

Hey @markt-asf what do you think about this PR ?

@markt-asf
Copy link
Contributor

A couple of those files appear to be missing ALv2 headers. On that topic, it looks like the markdown files need an ALv2 header if possible as well.

Add a basic `markdownlint` config file.
Add a `yamllint` config file.
Lint both Markdown and YAML files.
@jbampton
Copy link
Member Author

Hey @markt-asf I have rebased and moved the two config files back to the repo root.

The 2 files are not specific to GitHub so say we moved to GitLab we wouldn't want our whole repo config files in a GitHub folder.

I have also now added the licenses to all new files.

@jbampton jbampton changed the title Add a GitHub action to lint the Markdown and YAML files. feat(CI): add a GitHub action to lint the Markdown and YAML files. Dec 17, 2020
steps:
- uses: actions/checkout@v2
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML Lint is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation. The new ASF rules mean we can't use third party scripts for GitHub Actions. https://github.com/marketplace/actions/yaml-lint

This YAML check with yamllint can be refactored to run on the official Python GitHub action by installing and running yamllint with pip.

- master
pull_request:
branches:
- master
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linters should probably only rull on pull request to speed up build times.
Linting is a more minor test etc.

@jbampton jbampton changed the title feat(CI): add a GitHub action to lint the Markdown and YAML files. [WIP] - feat(CI): add a GitHub action to lint the Markdown and YAML files. Feb 14, 2021
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

Successfully merging this pull request may close these issues.

3 participants