Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

ci: only run go steps if only changing go #12321

Merged
merged 2 commits into from
Jul 20, 2020
Merged

ci: only run go steps if only changing go #12321

merged 2 commits into from
Jul 20, 2020

Conversation

keegancsmith
Copy link
Member

@keegancsmith keegancsmith commented Jul 20, 2020

This should significantly speed up Go PR checks.

image
image
\o/

@keegancsmith keegancsmith requested review from mrnugget, beyang and a team July 20, 2020 09:14
Copy link
Contributor

@mrnugget mrnugget left a comment

Choose a reason for hiding this comment

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

Magnificent!

@@ -78,12 +82,21 @@ func ComputeConfig() Config {
mustIncludeCommits[i] = strings.TrimSpace(mustIncludeCommits[i])
}
}

var changedFiles []string
if output, err := exec.Command("git", "diff", "--name-only", "origin/master...").Output(); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if the merge target is not master?

Copy link
Member Author

@keegancsmith keegancsmith Jul 20, 2020

Choose a reason for hiding this comment

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

I think that is fine, this will then just include more files than necessary. As an optimization if people have long lived dev branches we can make this smarter.

Note: this is the same check we have for docs changes.

@keegancsmith keegancsmith merged commit 42f8140 into master Jul 20, 2020
@keegancsmith keegancsmith deleted the k/ci-skip-web branch July 20, 2020 10:28
pecigonzalo added a commit that referenced this pull request Sep 8, 2020
The changes from #12321 make is so we only run Go checks if required, but we need to maintain the workflow of building docker images in no-test branches
pecigonzalo added a commit that referenced this pull request Sep 8, 2020
The changes from #12321 make is so we only run Go checks if required, but we need to maintain the workflow of building docker images in no-test branches
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants