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

Optimize custom fetch-depth settings for workflows #163

Open
atc0005 opened this issue Sep 1, 2023 · 1 comment
Open

Optimize custom fetch-depth settings for workflows #163

atc0005 opened this issue Sep 1, 2023 · 1 comment
Assignees
Labels
bug Something isn't working CI

Comments

@atc0005
Copy link
Owner

atc0005 commented Sep 1, 2023

As part of #148 and later GH issues/PRs I switched from using a fetch-depth of 0 (everything) to the last 50 commits and also included an additional step to pull the last 50 commits from the primary & development branches.

This works and in some cases may be better than before, but I applied those settings in places where it isn't strictly needed.

For example, the go.mod validation job steps don't need 50 commits to determine whether there are missing changes, just the very last commit for the PR branch being evaluated.

There are other places where a single commit is sufficient for the workflow job(s).

@atc0005 atc0005 added bug Something isn't working CI labels Sep 1, 2023
@atc0005 atc0005 self-assigned this Sep 1, 2023
@atc0005 atc0005 pinned this issue Sep 1, 2023
@atc0005
Copy link
Owner Author

atc0005 commented Sep 1, 2023

For example, the go.mod validation job steps don't need 50 commits to determine whether there are missing changes, just the very last commit for the PR branch being evaluated.

There are other places where a single commit is sufficient for the workflow job(s).

I should clarify: the Assert PR branch is ahead job is the primary focus. It is unlikely that many commits are needed for this job to serve its purpose properly.

atc0005 added a commit that referenced this issue Sep 1, 2023
Of note:

- move 'Assert source branches are set' check first
  within 'Assert PR branch is ahead' job as it needs
  to run and is the cheapest way to fail fast if
  required values are not set
- simplify code check step where extended options are
  not needed (see also GH-163 for future work)
- add missing 'Fetch additional references' step for jobs
  where version calculation is needed (most build & package
  generation tasks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI
Projects
None yet
Development

No branches or pull requests

1 participant