UI Smoke Tests #1353
This file contains 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
name: UI Smoke Tests | |
on: | |
workflow_run: | |
workflows: | |
- Build DynamoAll.sln net8.0 | |
types: | |
- completed | |
env: | |
TEST_EXECUTE_DOWNLOAD_URL: https://downloads.smartbear.com/TestExecute1559SLM.exe | |
WORKFLOW_RUN_WORKFLOW_ID: ${{ github.event.workflow_run.workflow_id }} | |
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} | |
WORKFLOW_RUN_NAME: ${{ github.event.workflow_run.name }} | |
WORKFLOW_RUN_HTML_URL: ${{ github.event.workflow_run.html_url }} | |
jobs: | |
ui_smoke_tests: | |
name: UI Smoke Tests | |
timeout-minutes: 60 | |
runs-on: windows-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: DynamoDS/DynamoTestCompleteTests | |
token: ${{ secrets.DYNAMO_TESTS_TOKEN }} | |
ref: master | |
- name: Download TestExecute | |
run: Invoke-WebRequest -Uri $env:TEST_EXECUTE_DOWNLOAD_URL -OutFile ".\TE.exe" | |
- name: Install TestExecute | |
shell: cmd | |
run: .\TE.exe -SilentInstall | |
- name: Download Build Artifact | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
name: DynamoSandbox | |
workflow: ${{ env.WORKFLOW_RUN_WORKFLOW_ID }} | |
run_id: ${{ env.WORKFLOW_RUN_ID }} | |
path: ${{ github.workspace }}\build | |
- name: Download Pull Request Artifact | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
name: pr_data | |
workflow: ${{ env.WORKFLOW_RUN_WORKFLOW_ID }} | |
run_id: ${{ env.WORKFLOW_RUN_ID }} | |
path: ${{ github.workspace }}\pr | |
- name: Set Run Details | |
run: | | |
"PR_NUMBER=$(Get-Content -Path ${{ github.workspace }}\pr\pr_number.txt)" | Out-File -FilePath $env:GITHUB_ENV -Append | |
"CHECK_NAME=$("UI Smoke Tests", $($env:WORKFLOW_RUN_NAME -Split " ")[-1] -Join " - ")" | Out-File -FilePath $env:GITHUB_ENV -Append | |
- name: Run UI Smoke Tests | |
shell: cmd | |
run: .\utils\run_tests.bat ${{ secrets.TEST_EXECUTE_ACCESS_KEY }} Dynamo\Dynamo.pjs DynamoSandbox SmokeTests ${{ github.workspace }}\build | |
- name: Publish Test Report | |
id: test_report | |
if: always() | |
uses: dorny/test-reporter@v1.7.0 | |
with: | |
name: ${{ env.CHECK_NAME }} | |
path: reports/report.xml | |
reporter: java-junit | |
- name: Add Test Summary | |
if: always() | |
run: | | |
if (Test-Path -Path reports/summary.md) { | |
Get-Content -Path reports/summary.md | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | |
} | |
- name: Add Run Summary | |
if: always() | |
run: | | |
$run_summary=@" | |
### Run Summary | |
Workflow Run: [$env:WORKFLOW_RUN_NAME]($env:WORKFLOW_RUN_HTML_URL) | |
Check: [$env:CHECK_NAME](${{ steps.test_report.outputs.url_html }}) | |
$(if ($env:PR_NUMBER) { | |
"Pull Request: [#$env:PR_NUMBER](${{ format('{0}/{1}/pull/{2}', github.server_url, github.repository, env.PR_NUMBER) }})" | |
}) | |
"@ | |
$run_summary | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | |
- name: Add Pull Request Comment | |
if: always() | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
$pr_comment=@" | |
## UI Smoke Tests | |
Test: **${{ steps.test_report.outputs.conclusion }}**. ${{ steps.test_report.outputs.passed }} passed, ${{ steps.test_report.outputs.failed }} failed. | |
[TestComplete Test Result]($(Get-Content -Path ${{ github.workspace }}\reports\result.txt)) | |
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 }} | |
} |