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

Add CI tests #251

Open
trevorcampbell opened this issue Sep 16, 2023 · 5 comments
Open

Add CI tests #251

trevorcampbell opened this issue Sep 16, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@trevorcampbell
Copy link
Contributor

trevorcampbell commented Sep 16, 2023

The test should do the following:

  • run on PR to content or change to dockerfile (but only after the dockerfile rebuilds per the pre-existing workflow)
  • build the book, check for new warnings
  • inspect the HTML and somehow display diffs. I'm sure there's some fancy HTML-page-diffing library out there. We can combine that with some sort of deploy preview tool. Would help spot unintended differences in HTML version caused by changes.
  • something similar for the PDF build? Not sure if that's possible

Once we get this working, make the same change in the R version.

@trevorcampbell trevorcampbell added the enhancement New feature or request label Sep 16, 2023
@trevorcampbell
Copy link
Contributor Author

trevorcampbell commented Sep 24, 2023

This was partially addressed in some recent commits (around 5aec41a , but there are a few with bugfixes etc). These commits essentially publish a deploy preview to a subfolder of the main domain.

Next step is to use puppeteer or the like to render websites to an image and diff them for inspection in the PR.

see below, addressed using website_diff

@trevorcampbell
Copy link
Contributor Author

trevorcampbell commented Nov 13, 2023

Style guide CI as well: run various grep commands and print the output somewhere so we can double-check easily common changes people accidentally make

diff with main branch grep results to see changes relevant to style guide. But then we need to guarantee we start with a "clean slate" -- or, similarly, this has open-loop error -- need to include some sort of global checking regardless of what main has. Maybe print a summary of the main grep diff as well as the global list, and only error if the diff to main has erroneous changes

@trevorcampbell
Copy link
Contributor Author

trevorcampbell commented Nov 15, 2023

Do simple cleanup as well (trailing whitespace removal, etc). Run code formatting possible?

@trevorcampbell
Copy link
Contributor Author

The webdiff preview was added in 9b81640 using https://github.com/trevorcampbell/website_diff

@trevorcampbell
Copy link
Contributor Author

trevorcampbell commented Aug 21, 2024

I think the only things left here worth doing are:

  • check build logs for new warnings/errors, post result to the PR thread
  • check common spelling/formatting/etc errors, post result to PR thread
  • automatic code formatting (80ch line limits, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant