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: restrict main branch for on push tests #1384

Merged
merged 1 commit into from
May 1, 2024

Conversation

huxuan
Copy link
Member

@huxuan huxuan commented Apr 30, 2024

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

Currently, the workflow tests will be triggerred when there is a new push on ALL branches, it will lead to redundant workflow runs when a pull request is created from the current repo rather than forked repo. For example, pre-commit update will lead to two tests workflow runs against same commit, one for push and the other for pull request:

https://github.com/pypa/pipx/actions/runs/8884599944
https://github.com/pypa/pipx/actions/runs/8884599801

image

Test plan

Tested by running

# command(s) to exercise these changes

@huxuan huxuan marked this pull request as ready for review April 30, 2024 06:10
@dukecat0 dukecat0 force-pushed the xuan.hu/only-tests-on-push-main branch from 3f96b95 to fcb1cd1 Compare April 30, 2024 11:08
@huxuan huxuan force-pushed the xuan.hu/only-tests-on-push-main branch from fcb1cd1 to 925f824 Compare April 30, 2024 23:26
@dukecat0 dukecat0 merged commit bd69963 into pypa:main May 1, 2024
14 checks passed
@huxuan huxuan deleted the xuan.hu/only-tests-on-push-main branch May 28, 2024 09:08
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