Skip to content

Commit

Permalink
Update smoke tests workflow (#14835)
Browse files Browse the repository at this point in the history
  • Loading branch information
avidit authored Jan 22, 2024
1 parent c7e42fd commit d687a0f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
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 }}

0 comments on commit d687a0f

Please sign in to comment.