Skip to content

ci: run build, link check, and linters on every PR - #41

Open
eddie-knight wants to merge 2 commits into
mainfrom
ci-lint
Open

eddie-knight wants to merge 2 commits into
mainfrom
ci-lint

Conversation

@eddie-knight

Copy link
Copy Markdown
Collaborator

resolves #40

RuboCop's safe autocorrect over theme/_plugins (hash alignment, trailing
commas, string-concat indentation, one unused block arg), plus three
whitespace nits yamllint flagged in pages.yml and _config.yml.

Rendered _site is byte-identical apart from the feed timestamp.

Signed-off-by: Eddie Knight <knight@linux.com>
Adds .github/workflows/ci.yml with two jobs:

- test: make test — jekyll build (catalog_pages.rb fails on duplicate ids
  and unresolvable references) followed by htmlproofer.
- lint: make lint — RuboCop over theme/_plugins, yamllint over data/ and
  the workflows — plus actionlint on the workflow files themselves.

Both reuse the Makefile so CI and local runs are the same command.

Linter configs match the code that already exists rather than rewriting
it: yamllint keeps line-length off (record descriptions are prose) and
sequence indentation 'consistent' (data/ and the workflows differ);
RuboCop keeps double quotes and drops Metrics, since splitting the
validator to satisfy a length cop would scatter the guards.

External link checking stays off — it would fail PRs on third-party
downtime.

Signed-off-by: Eddie Knight <knight@linux.com>

@SecurityCRob SecurityCRob left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not being a developerologist..... this looks good to me, and i applaud the intention of the checking for each pr!

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.

Add linters and testing for CI

3 participants