Skip to content

Conversation

@mateusoliveira43
Copy link

Description

I noticed the project CI runs "twice" in each commit to the repository (one for the real commit and one for the latest-changes job).
Ex.: https://github.com/tiangolo/fastapi/actions/runs/5348732342 and https://github.com/tiangolo/fastapi/actions/runs/5348736904

This PR assures it only runs after latest-changes job.

What has been done to achieve the goal

Run grep -Iinr 'push' .github/workflows in the project root to check that all jobs that are run on push were updated.

Testing Instructions

I think there is not a easy to test out github actions (what I usually do before merging them, if I want to test prior to merging, is running it from my fork).

But I do this in my personal projects, so I think it safe 😄 Ex.: If you check the commits in this repo, the CI only run after the latest-changes job.

@tiangolo
Copy link
Member

📝 Docs preview for commit 5956d1a at: https://6494a91e47ca610b1aab5880--fastapi.netlify.app

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
@alejsdev alejsdev changed the title fix: Run CI only once on push 🔧 Run CI only once on push Aug 2, 2024
@tiangolo
Copy link
Member

Thanks! But this would mean that tests on push would strongly depend on the GitHub Action latest-changes. If for some reason that action is not triggered (e.g. GitHub Actions glitch, expired token, etc.) then these tests wouldn't run. So I prefer to keep it as it is. But thanks for the interest! ☕

@tiangolo tiangolo closed this Aug 16, 2024
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.

4 participants