adafruit / cookiecutter-adafruit-circuitpython

Cookiecutter template for Adafruit's CircuitPython libraries.
MIT License
22 stars 37 forks source link

don't run tests twice #213

Closed jandelgado closed 1 year ago

jandelgado commented 1 year ago

currently tests are run twice, both for the pull request and the push to the branch. The proposed change makes sure tests are only run once, speeding up CI run.

before: image

after: image

tekktrik commented 1 year ago

Hi! I'll take a look at this within the next 24 hours, but I believe these only run twice if the pull request branch and target branch are the same repository (with the same owner), correct? It seems that if a library gets a pull request from a contributor from a fork, as is now, it only runs once. The exception would be it someone with write access to the adafruit repository pull requested from a branch they created within the adafruit repository, or if a contributor pull requests to their own personal repository, then it runs twice. Please correct me if that's not correct.

If this is the cases, my inclination is to keep the CI as it is now for a few reasons:

Given the above, the benefit to Community Bundle libraries is minimal, and the potential impact to Adafruit Bundle libraries leans more negative, that's my thinking. Additionally, if this is an issue for a Community library, this change can always be made locally, but since the Adafruit and Community libraries share this bit, I'm inclined to weigh in favor of keeping things as is.