bootstrap-ruby / bootstrap_form

Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
MIT License
1.64k stars 352 forks source link

Generate Screenshots in CI #715

Closed lcreid closed 7 months ago

lcreid commented 8 months ago

Generate screenshots in CI, and add a commit if any screenshots change. Add some documentation that explains how to deal with screenshots changing.

There are a couple of examples (50, 51) that appear to be failing. I've added #714 for them.

I put the sequence of steps to commit the changes in a Rake task, thinking it would allow us to run the identical steps locally, if needed. Also, it's a bit easier to handle the long commit message in Ruby, at least for me. Does that make sense?

The git push when screenshots change triggers another CI run. To avoid that, I added [skip ci] to the commit message, but I fear that it would prevent CI runs when, for example, one rebases on the upstream main. The last commit will still have [skip ci] and so won't run. So I took it out and we'll simply live with double CI. Okay?

Fixes: #711

lcreid commented 7 months ago

@donv This might affect your workflow more than mine. What do you think?

lcreid commented 7 months ago

I'll merge this and we can discuss better solutions later.