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(workflow): move 'generate_cli_screenshots' steps to 'docspublish' #1126

Merged
merged 3 commits into from
May 20, 2024

Conversation

marcosdotme
Copy link
Contributor

@marcosdotme marcosdotme commented May 20, 2024

Since the purpose is to updated the CLI screenshots on Github Pages, combining this two workflows makes sense.

Closes: #1125

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 every push to master branch, this Github Action Workflow will be triggered and will update the CLI screenshots and also updated the images on Github Pages (if any change is detected).

Steps to Test This Pull Request

I tested manually using an clone of commitizen repo.

General view of workflow:

image

Update CLI screenshots using the scripts/gen_cli_help_screenshots.py (I add ci_v3 to command descriptions just to workflow detect changes and to maintain traceability):

image

Update the images on Github Pages:

image

Image successfully updated on Github Pages:

image

Relevant changes (@Lee-W)

  • Renamed the workflow generate-cli-screenshots to update-cli-screenshots
  • Added [skip ci] in the description of the commit generated by the job update-cli-screenshots. The final step of this job is create an commit and push to master. And the workflow is triggered by pushes to master, so if we not add [skip ci], the workflow starts an infinite loop
  • Add step "Pull latest changes" to capture the commit maded by update-cli-screenshots

@marcosdotme
Copy link
Contributor Author

@Lee-W This PR refers to requested changes on #1122

Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.54%. Comparing base (120d514) to head (4f0569d).
Report is 321 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1126      +/-   ##
==========================================
+ 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.

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.

Mostly good. Left a minor nitpick.

.github/workflows/docspublish.yml Show resolved Hide resolved
@Lee-W Lee-W added pr-status: ready-to-merge almost ready to merge. just keep it for a few days for others to check and removed pr-status: wait-for-review labels May 20, 2024
Since the purpose is to updated the CLI screenshots on Github Pages,
combining this two workflows makes sense.
@Lee-W Lee-W mentioned this pull request May 20, 2024
4 tasks
@Lee-W Lee-W merged commit 59270b9 into commitizen-tools:master May 20, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: ready-to-merge almost ready to merge. just keep it for a few days for others to check pr-status: wait-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI screenshots will not be updated on Github Pages
2 participants