-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Added new GitHub action for manual integration test run based on PR #4135
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # | ||
| # This workflow allows manually running integration tests against an open PR. | ||
| # Go to Actions → "Integration Tests (Manual)" → Run workflow → enter the PR number. | ||
| # | ||
| # It reuses the existing dotnet-build-and-test and python-merge-tests workflows, | ||
| # passing the PR's head commit SHA so they check out and test the PR code. | ||
| # | ||
|
|
||
| name: Integration Tests (Manual) | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| pr-number: | ||
| description: "PR number to run integration tests against" | ||
| required: true | ||
| type: string | ||
|
|
||
| concurrency: | ||
| group: integration-tests-manual-pr-${{ github.event.inputs.pr-number }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| resolve-pr: | ||
| name: Resolve PR | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| head-sha: ${{ steps.pr-info.outputs.head-sha }} | ||
| steps: | ||
| - name: Get PR info | ||
| id: pr-info | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| PR_DATA=$(gh pr view ${{ github.event.inputs.pr-number }} --repo ${{ github.repository }} --json headRefOid,state) | ||
| PR_STATE=$(echo "$PR_DATA" | jq -r '.state') | ||
| HEAD_SHA=$(echo "$PR_DATA" | jq -r '.headRefOid') | ||
|
|
||
dmytrostruk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if [ "$PR_STATE" != "OPEN" ]; then | ||
| echo "::error::PR #${{ github.event.inputs.pr-number }} is not open (state: $PR_STATE)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "head-sha=$HEAD_SHA" >> "$GITHUB_OUTPUT" | ||
| echo "Running integration tests for PR #${{ github.event.inputs.pr-number }} at commit $HEAD_SHA" | ||
dmytrostruk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| dotnet-integration-tests: | ||
| name: .NET Integration Tests | ||
| needs: resolve-pr | ||
| uses: ./.github/workflows/dotnet-build-and-test.yml | ||
| with: | ||
| checkout-ref: ${{ needs.resolve-pr.outputs.head-sha }} | ||
| secrets: inherit | ||
|
|
||
| python-integration-tests: | ||
| name: Python Integration Tests | ||
| needs: resolve-pr | ||
| uses: ./.github/workflows/python-merge-tests.yml | ||
| with: | ||
| checkout-ref: ${{ needs.resolve-pr.outputs.head-sha }} | ||
| secrets: inherit | ||
dmytrostruk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.