dtcenter / METdataio

https://metdataio.readthedocs.io/en/latest/index.html
Apache License 2.0
5 stars 3 forks source link

Skip SonarQube scan for PR from fork and allow compare_db workflow from fork #327

Closed georgemccabe closed 1 month ago

georgemccabe commented 2 months ago

Pull Request Testing

None -- need pull request GitHub Actions workflows to run to confirm that the changes work as expected

Pull Request Checklist

See the METplus Workflow for details.

georgemccabe commented 2 months ago

UPDATE: I updated the logic to skip the code coverage jobs if the PR is from a fork. After this PR is merged, we should double check that a PR from dtcenter still generates the code coverage report properly.

@JohnHalleyGotway -- could you review the result of the SonarQube workflow coming from a fork? If we like the format, we could apply this to the other repositories. https://github.com/dtcenter/METdataio/actions/runs/10725585739/job/29743751876?pr=327

Note the 2 later jobs that still run are set to run always to generate the code coverage report even if the tests fail. I'm not sure if there is a way to make it fail on the first failed job and prevent the other jobs from running even if they are marked with if: always()

JohnHalleyGotway commented 2 months ago

@georgemccabe that log message seems clear and useful to me:

SonarQube scan cannot be run from a fork
Error: Process completed with exit code 1.

I suppose the only issue is if that feature is ever actually added, we'll want to revise this logic.

Thanks for working on this and providing a clear log message.