-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(docs): Add vale style checker #419
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/test.yaml
Outdated
working-directory: ${{ inputs.working-directory }} | ||
steps: | ||
- name: Checkout repo to runner | ||
uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind pinning to a specific version? Also, does this mean we'll be dropping codespell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey 👋 , I set it to use v4.1.7 like the other steps, good catch! We're not dropping anything, I consider vale in a pilot phase where we can see what it suggests and take notes - it will annotate the docs and it will not fail the job. Like we do with Dockerfile linting with hadolint.
@arturo-seijas @erinecon @gregory-schiano this is mergeable now, note that for github runners I have to explicitly install |
- name: Run Vale tests | ||
uses: errata-ai/vale-action@reviewdog | ||
with: | ||
files: ./docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files: ./docs | |
files: ${{ inputs.charm-directory }}/docs |
This would allow the check to run for paas-app-charmer charms, which usually have the docs living in charm/docs
, see https://github.com/canonical/netbox/tree/main/charm/docs and https://github.com/canonical/netbox/blob/main/.github/workflows/test.yaml#L11 .
Applicable spec:
Overview
Adds the vale action with the Canonical vale styles.
The Canonical styles are hosted at praecepta and we're making use of the recommended workflow that is supplied in the README.md. In addition to our operator-workflows, data-platform-doc-tools is using the same workflow.
The vale action being used is the official one.
Rationale
Vale is gaining adoption as a doc style checker, hence including it in our workflow to test things out (currently it will not fail the action).
Workflow Changes
The
test.yaml
contains a style checker job afterwoke
.Checklist
urgent
,trivial
,complex
)