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

Update smoke tests workflow #14835

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/build_dynamo_all_net8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ jobs:
path: ${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
if-no-files-found: warn
retention-days: 3
- name: Save Pull Request Artifact
env:
PR_NUMBER: ${{ github.event.number }}
save_pr_data:
name: Save PR Data
runs-on: ubuntu-latest
steps:
- name: Save PR Data
run: |
New-Item -Path ${{ github.workspace }}\pr -ItemType Directory -Force
$env:PR_NUMBER | Out-File -FilePath ${{ github.workspace }}\pr\pr_number.txt
- name: Upload Pull Request Artifact
mkdir -p ${{ github.workspace }}/pr
echo ${{ github.event.number }} > ${{ github.workspace }}/pr/pr_number.txt
- name: Upload PR Data
uses: actions/upload-artifact@v4
with:
name: pr_data
path: ${{ github.workspace }}\pr
path: ${{ github.workspace }}/pr
if-no-files-found: warn
retention-days: 3
31 changes: 27 additions & 4 deletions .github/workflows/ui_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ jobs:
})
"@
$run_summary | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
- name: Add Pull Request Comment
- name: Create Pull Request Comment
if: always()
id: create_comment
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -91,6 +92,28 @@ jobs:
Workflow Run: [${{ github.workflow }}](${{ format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id) }})
Check: [$env:CHECK_NAME](${{ steps.test_report.outputs.url_html }})
"@
if ($env:PR_NUMBER) {
gh pr comment $env:PR_NUMBER --body $pr_comment --repo ${{ github.repository }}
}
$pr_comment | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Find Comment
if: env.PR_NUMBER != ''
uses: peter-evans/find-comment@v2
id: find_comment
with:
issue-number: ${{ env.PR_NUMBER }}
comment-author: github-actions[bot]
body-includes: UI Smoke Tests
direction: last
- name: Create comment
if: env.PR_NUMBER != '' && steps.find_comment.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ env.PR_NUMBER }}
body: |
${{ steps.create_comment.outputs.pr_comment }}
- name: Update comment
if: env.PR_NUMBER != '' && steps.find_comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: replace
body: |
${{ steps.create_comment.outputs.pr_comment }}
Loading