Skip to content

Conversation

@cttsai-stripe
Copy link

@cttsai-stripe cttsai-stripe commented Dec 3, 2025

Summary

Update the action version and remove fetch-depth: 0 to speed up the action.
Reducing the checkout time from averaging ~2m to under 20s.
https://github.com/stripe/stripe-ios/actions/runs/19905920015/job/57061959041

Starting from checkout-v4:

Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags.

Motivation

In the worst scenario, it takes 9 minutes to checkout.
https://stripe.slack.com/archives/C02HQBW38JX/p1764783011920219

@cttsai-stripe cttsai-stripe changed the title update checkout action version Speed up checkout action in dead code check Dec 3, 2025
@cttsai-stripe cttsai-stripe marked this pull request as ready for review December 3, 2025 20:03
@cttsai-stripe cttsai-stripe requested review from a team as code owners December 3, 2025 20:03
uses: actions/checkout@v2
with:
fetch-depth: 0
uses: actions/checkout@v6
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do this on purpose so that we can compare with merge base. I think if you modified some swift code in this PR to get the check to run it might fail.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/stripe/stripe-ios/actions/runs/19905920015/job/57061959041 is the check that passed on a commit with swift code change. I uncommitted that change when ready for review. But if fetch-depth is necessary, I can close this PR and keep the issue open for the next iOS runner to investigate it.

@davidme-stripe davidme-stripe removed their request for review December 17, 2025 17:17
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.

3 participants