Repository navigation
fix: checkout PR head for labeled integration tests - #560
Merged
Merged
Conversation
Use the pull request head SHA for label-triggered integration tests and explicitly allow fork PR checkout in that context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: aea8d672-9770-415f-bca2-2d8205f31152
Collaborator
Author
|
Members who can add the
|
Contributor
Code Metrics Report
Details | | main (378c332) | #560 (e8780cb) | +/- |
|---------------------|----------------|----------------|------|
| Coverage | 36.4% | 36.4% | 0.0% |
| Files | 32 | 32 | 0 |
| Lines | 3469 | 3469 | 0 |
| Covered | 1265 | 1265 | 0 |
| Code to Test Ratio | 1:0.9 | 1:0.9 | 0.0 |
| Code | 7120 | 7120 | 0 |
| Test | 7063 | 7063 | 0 |
+ | Test Execution Time | 12s | 8s | -4s |Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For large changes, there are cases where we want to run integration tests before merging, but the current setup was not working properly.
Summary
pull_request_targetintegration tests, rather than the default-branch commit.allow-unsafe-pr-checkoutforpull_request_targetso labeled fork PRs can also be tested.Background
Adding the
integration-testlabel currently runs tests againstmaininstead of the PR changes because checkout does not specify the PR head SHA.Validation
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/integration.ymlgit diff --checkThe updated label-triggered checkout has not been exercised in a live workflow run.