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

feat(ci/cd): automates the generation of CLI screenshots #1122

Merged
merged 2 commits into from
May 18, 2024

Conversation

marcosdotme
Copy link
Contributor

Description

Checklist

  • Add test cases to all the changes you introduce (not applicable)
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test (not applicable)
  • Test the changes on the local machine manually
  • Update the documentation for the changes (not applicable)

Expected behavior

After any pull requested merged, this Github Action Workflow will be triggered and will updated the CLI screenshots.

Steps to Test This Pull Request

I tested manually using an clone of commitizen repo.

General view:

image

Generate CLI screenshots using the scripts/gen_cli_help_screenshots.py:

image

Push updated images to repository:

image

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.54%. Comparing base (120d514) to head (046e76b).
Report is 317 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1122      +/-   ##
==========================================
+ Coverage   97.33%   97.54%   +0.20%     
==========================================
  Files          42       55      +13     
  Lines        2104     2486     +382     
==========================================
+ Hits         2048     2425     +377     
- Misses         56       61       +5     
Flag Coverage Δ
unittests 97.54% <ø> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@woile
Copy link
Member

woile commented May 18, 2024

Wow nice! LGTM, @Lee-W ?

Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@Lee-W
Copy link
Member

Lee-W commented May 18, 2024

Closes: #1112

@Lee-W Lee-W merged commit ce2128f into commitizen-tools:master May 18, 2024
18 checks passed
@Lee-W
Copy link
Member

Lee-W commented May 18, 2024

ah... I forget to check the commit message. this should be ci(..) instead

@marcosdotme
Copy link
Contributor Author

ah... I forget to check the commit message. this should be ci(..) instead

Sure! I can rebase/ammend this. Any suggestions about the scope?

@marcosdotme
Copy link
Contributor Author

Ops, it got merged already. Sorry for that! @Lee-W

@Lee-W
Copy link
Member

Lee-W commented May 18, 2024

Ops, it got merged already. Sorry for that! @Lee-W

Yes, I suppose I wasn't actually awake. 🤦‍♂️

But after a second thought, we probably should move it to https://github.com/commitizen-tools/commitizen/blob/master/.github/workflows/docspublish.yml. otherwise, we might update the image without having them in the doc

@marcosdotme
Copy link
Contributor Author

Ops, it got merged already. Sorry for that! @Lee-W

Yes, I suppose I wasn't actually awake. 🤦‍♂️

But after a second thought, we probably should move it to https://github.com/commitizen-tools/commitizen/blob/master/.github/workflows/docspublish.yml. otherwise, we might update the image without having them in the doc

Yeah, makes sense. The suggestion is to move all the steps on generate_cli_screenshots.yml to docspublish.yml, or somehow invoke the generate_cli_screenshots.yml after run docspublish.yml?

May I open an another issue to fix this?

@Lee-W
Copy link
Member

Lee-W commented May 18, 2024

The suggestion is to move all the steps on generate_cli_screenshots.yml to docspublish.yml,
Yes

somehow invoke the generate_cli_screenshots.yml after run docspublish.yml

nope, generate_cli_screenshots should be invoked first

May I open an another issue to fix this?

Yep, sure :)

@marcosdotme
Copy link
Contributor Author

nope, generate_cli_screenshots should be invoked first

Yes, yes. I thought "before" and wrote "after" lol.

So, just to make things clear. The ideia is to delete generate_cli_screenshots.yml and move all the steps on it to docspublish.yml, and steps from generate_cli_screenshots.yml should run before the docspublish.yml steps. Right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants