feat: add [MacPortsVersion] badge#11807
Conversation
There was a problem hiding this comment.
Could you please switch to non-mocked tests, i.e. using real data and API calls? See https://github.com/badges/shields/blob/master/doc/service-tests.md for more information. :)
There was a problem hiding this comment.
Hi @PyvesB , thanks for the feedback! I tried switching to live tests but ran into an issue — ports.macports.org appears to be unreachable from the GitHub Actions CI runners. Both the valid and not-found tests consistently time out when hitting the real API, even though the API itself works fine when accessed directly.
I've verified the service code is correct and the API returns the expected response format, so I belive it's purely a connectivity issue from the CI environment rather than a problem with the implementation.
I've reverted back to mocked tests for now. Happy to switch to live tests if there's a way to work around the connectivity issue, or if there's a preferred approach for services where the upstream API isn't accessible from CI. Let me know how you'd like to proceed! Really appreciate your review and guidance with this!
There was a problem hiding this comment.
That's pretty odd. Perhaps we could still have a live test or two in addition to the mocked ones, but with .skipWhen(() => process.env.GITHUB_ACTIONS === 'true'), so that we they are still run when launched locally?
Adds a version badge for MacPorts ports.
Fetches JSON from
https://ports.macports.org/api/v1/ports/:portName/and extracts theversionfield.Example:
/macports/v/git→v2.47.1Closes #9588