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: Introduce link checker job #2844

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Dec 21, 2022

Follow-up of #2842

  • Checker typically ends within 30 seconds which sounds acceptable. Faster than Scala jobs anyway.
  • Check is skipped if no ~.md are changed, so false alerts due to tentative network failure are less likely to happen

https://github.com/gaurav-nelson/github-action-markdown-link-check is used since it is highly starred in this area and its README are well-written.

Also fixed some "broken" links found in test runs.

Example

Failure

https://github.com/exoego/scala-steward/actions/runs/3746779243/jobs/6362385292

image

image

Succcess

https://github.com/exoego/scala-steward/actions/runs/3746849923/jobs/6362522900
image

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Patch coverage has no change and project coverage change: +8.63 🎉

Comparison is base (04d4c4d) 82.44% compared to head (a506ddb) 91.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2844      +/-   ##
==========================================
+ Coverage   82.44%   91.07%   +8.63%     
==========================================
  Files         152      160       +8     
  Lines        2945     3329     +384     
  Branches      187      296     +109     
==========================================
+ Hits         2428     3032     +604     
+ Misses        517      297     -220     

see 166 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@exoego exoego changed the title Introduce link checker job CI: Introduce link checker job Dec 21, 2022
@exoego exoego marked this pull request as ready for review December 21, 2022 06:18
@@ -191,7 +191,6 @@ pipelines:
There is multiple articles on how to run Scala Steward on-premise:

* [Running Scala Steward On-premise](https://engineering.avast.io/running-scala-steward-on-premise)
* [Running scala-steward periodically on AWS Fargate](https://medium.com/@tanishiking/running-scala-steward-periodically-on-aws-fargate-3d3d202f0f7)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This blog appears to be gone.

@fthomas
Copy link
Member

fthomas commented Dec 21, 2022

This is great! Could we also run this on a schedule like once per week or so? It would then notify us about broken links (like those replaced in #2842) in a timely manner without the need that somebody touches these files in a PR.

@@ -13,10 +13,13 @@ Here are two pull requests that demonstrate this feature:
And here are all pull requests where Scala Steward applied Scalafix
migrations:

<!-- These links exists but returns 404 often so skip check -->
Copy link
Member

Choose a reason for hiding this comment

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

The pulls URLs require that the user is logged into GitHub. I guess this is why they are reported as dead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha, I see

@exoego exoego marked this pull request as draft December 23, 2022 05:44
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gaurav-nelson/github-action-markdown-link-check@v1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note) I am waiting gaurav-nelson/github-action-markdown-link-check#168 to be released
Otherwise, the GH action checks not only files in docs but also in module/docs/mdoc/~ which contains vairables in links.

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

2 participants