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

ci: add previews.yml to re-generate assets #232

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Conversation

sgoudham
Copy link
Contributor

@sgoudham sgoudham commented Aug 9, 2024

This PR comes from my frustration on the lack of good font rendering on Linux.

I was trying to re-generate the previews to get them to match the existing previews. Unfortunately, Puppeteer seems to struggle with consistency across operating systems as highlighted in puppeteer/puppeteer#661

I tried the solutions commented in the above issue but nothing seemed to work. Ultimately, I gave up and decided to try and see if we can make it a concern of the CI. I was finally successful and this PR adds a new workflow previews.yml that re-generates the individual flavour previews and the catwalk preview.

You can view the output of a successful run in sgoudham/ci-playground#10

Limitations / Concerns:

  • We're using the macos-latest runner which is basically the entire reason why the font rendering matches up with the existing previews.
  • Telling pnpm to cache the directory results in an error where the chrome executable cannot be found. I tried setting the cache directory in the Puppeteer config file but it still failed and, honestly, I gave up after that.
  • The pnpm scripts are not correctly outputting exit code 1 and failing the CI pipeline. I'm not too fussed about it since we know if it's failed if it's not raised a PR when we're expecting it to create one but this should be looked into.

@sgoudham sgoudham force-pushed the ci/try-generate-previews branch from 9e8ed62 to 2237f03 Compare August 9, 2024 01:10
Copy link
Member

@uncenter uncenter left a comment

Choose a reason for hiding this comment

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

Looks good

.github/workflows/previews.yml Outdated Show resolved Hide resolved
Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com>
@sgoudham sgoudham merged commit 73fabd9 into main Sep 13, 2024
1 check passed
@sgoudham sgoudham deleted the ci/try-generate-previews branch September 13, 2024 01:03
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.

2 participants