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

Display GitHub Action Job Summary #502

Conversation

rtyley
Copy link
Contributor

@rtyley rtyley commented Jun 15, 2023

This is the complementary PR for scala-steward-org/scala-steward#3071.

While that PR creates the summary report, this is the PR that links up to GitHub's core.summary workflow command (as suggested by @alejandrohdezma in scala-steward-org/scala-steward#3071 (review)), to display the report in GitHub's Job summary.

In this change, if the run-summary.md file generated by the Scala Steward JVM process is found, it's written to the GitHub summary - if it's not found, that's not regarded as an error, tolerating older Scala Steward versions if they're being used.

rtyley and others added 2 commits June 15, 2023 12:26
This is the complementary PR for scala-steward-org/scala-steward#3071 -
while that PR _creates_ the summary report, this is the PR that links
up to GitHub's `core.summary` workflow command, to _display_ the report
in GitHub's Job summary.

https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#:~:text=core.summary
https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/#:~:text=core.summary

In this change, if the `run-summary.md` file generated by the
Scala Steward JVM process is found, it's written to the GitHub  summary.
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
core 100% 100% 0
modules 68% 87% 0
Summary 70% (461 / 662) 88% (76 / 86) 0

@github-actions
Copy link
Contributor

A snapshot release has been created as snapshots/502.

You can test it out with:

uses: scala-steward-org/scala-steward-action@snapshots/502

It will be automatically recreated on any change to this PR.

github-actions bot added a commit that referenced this pull request Jun 15, 2023
Copy link
Member

@alejandrohdezma alejandrohdezma left a comment

Choose a reason for hiding this comment

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

Thank you very much @rtyley! 😺

@alejandrohdezma alejandrohdezma merged commit b6f8161 into scala-steward-org:master Jun 15, 2023
@rtyley
Copy link
Contributor Author

rtyley commented Jun 15, 2023

Thank you very much @rtyley! 😺

Thanks @alejandrohdezma ! Are you ok to merge scala-steward-org/scala-steward#3071 too, in order to be able to try this out?

rtyley added a commit to rtyley/scala-steward-action that referenced this pull request Jun 16, 2023
This was something we missed from
scala-steward-org#502 -
because the `run-summary.md` file is saved by
scala-steward-org/scala-steward#3071
to the Scala Steward workspace, and almost the entire workspace is
persisted to cache by Scala Steward's GitHub Action, the report would
be persisted until the _next_ run of the GitHub Action, and
concievably, if the next run went wrong somehow, the incorrect _old_
summary could get reported against that subsequent run, which would
be bad.

The fix here is to delete the summary at the `saveWorkspaceCache()`
step, which occurs after the summary has been transferred to the
`GITHUB_STEP_SUMMARY` file by calling `core.summary()`.
rtyley added a commit to guardian/scala-steward-public-repos that referenced this pull request Jun 16, 2023
This includes scala-steward-org/scala-steward-action#502, for a more friendly summary of which repos failed or succeeded as Scala Steward was processing them.
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