From 1a9547fc7370af2fe2d105a9d1c1b91dd1b8f4ee Mon Sep 17 00:00:00 2001 From: Aabishkar KC Date: Mon, 27 Nov 2023 13:29:36 -0500 Subject: [PATCH] DYN-6454 Run smoke test on net8.0 build (#14639) --- ..._build.yml => build_dynamo_all_net6.0.yml} | 19 +++++++++++--- ..._build.yml => build_dynamo_all_net8.0.yml} | 19 +++++++++++--- .github/workflows/ui_smoke_tests.yml | 26 +++++++++++++++---- 3 files changed, 53 insertions(+), 11 deletions(-) rename .github/workflows/{dynamoAllNet6.0_build.yml => build_dynamo_all_net6.0.yml} (73%) rename .github/workflows/{dynamoAllNet8.0_build.yml => build_dynamo_all_net8.0.yml} (74%) diff --git a/.github/workflows/dynamoAllNet6.0_build.yml b/.github/workflows/build_dynamo_all_net6.0.yml similarity index 73% rename from .github/workflows/dynamoAllNet6.0_build.yml rename to .github/workflows/build_dynamo_all_net6.0.yml index d3be844e7a5..a538fc12402 100644 --- a/.github/workflows/dynamoAllNet6.0_build.yml +++ b/.github/workflows/build_dynamo_all_net6.0.yml @@ -1,6 +1,8 @@ -# Build Dynamo using latest VS and DotNET -name: DynamoAllNet6.0-Build +# Build DynamoAll.sln with .NET 6.0 +name: Build DynamoAll.sln net6.0 + on: [push,pull_request] + jobs: build: runs-on: windows-latest @@ -31,10 +33,21 @@ jobs: cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\AnyCPU\Release" echo "***Locating DynamoCLI for Windows!***" test ".\DynamoCLI.exe" && echo "DynamoCLI exists!" - - name: Upload Artifact + - name: Upload Build Artifact uses: actions/upload-artifact@v3 with: name: DynamoSandbox path: ${{ github.workspace }}\Dynamo\bin\AnyCPU\Release if-no-files-found: warn retention-days: 3 + - name: Save Pull Request Number + env: + PR_NUMBER: ${{ github.event.number }} + run: $PR_NUMBER | Out-File -FilePath pr_number.txt + - name: Upload Pull Request Artifact + uses: actions/upload-artifact@v3 + with: + name: pr_number + path: ${{ github.workspace }}\pr_number.txt + if-no-files-found: warn + retention-days: 3 diff --git a/.github/workflows/dynamoAllNet8.0_build.yml b/.github/workflows/build_dynamo_all_net8.0.yml similarity index 74% rename from .github/workflows/dynamoAllNet8.0_build.yml rename to .github/workflows/build_dynamo_all_net8.0.yml index fc030856092..5e6a5bf284c 100644 --- a/.github/workflows/dynamoAllNet8.0_build.yml +++ b/.github/workflows/build_dynamo_all_net8.0.yml @@ -1,6 +1,8 @@ -# Build Dynamo using latest VS and DotNET -name: DynamoAllNet8.0-Build +# Build DynamoAll.sln with .NET 8.0 +name: Build DynamoAll.sln net8.0 + on: [push,pull_request] + jobs: build: runs-on: windows-latest @@ -31,10 +33,21 @@ jobs: cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\AnyCPU\Release" echo "***Locating DynamoCLI for Windows!***" test ".\DynamoCLI.exe" && echo "DynamoCLI exists!" - - name: Upload Artifact + - name: Upload Build Artifact uses: actions/upload-artifact@v3 with: name: DynamoSandbox path: ${{ github.workspace }}\Dynamo\bin\AnyCPU\Release if-no-files-found: warn retention-days: 3 + - name: Save Pull Request Number + env: + PR_NUMBER: ${{ github.event.number }} + run: $PR_NUMBER | Out-File -FilePath pr_number.txt + - name: Upload Pull Request Artifact + uses: actions/upload-artifact@v3 + with: + name: pr_number + path: ${{ github.workspace }}\pr_number.txt + if-no-files-found: warn + retention-days: 3 diff --git a/.github/workflows/ui_smoke_tests.yml b/.github/workflows/ui_smoke_tests.yml index e32e5dbf793..a6a52aeb346 100644 --- a/.github/workflows/ui_smoke_tests.yml +++ b/.github/workflows/ui_smoke_tests.yml @@ -3,7 +3,8 @@ name: UI Smoke Tests on: workflow_run: workflows: - - DynamoAllNet6.0-Build + - Build DynamoAll.sln net6.0 + - Build DynamoAll.sln net8.0 types: - completed @@ -33,13 +34,20 @@ jobs: - name: Install TestExecute shell: cmd run: .\TE.exe -SilentInstall - - name: Download Artifact + - name: Download Build Artifact uses: dawidd6/action-download-artifact@v2 with: name: DynamoSandbox workflow: ${{ env.WORKFLOW_ID }} run_id: ${{ env.RUN_ID }} path: ${{ github.workspace }}\build + - name: Download Pull Request Artifact + uses: dawidd6/action-download-artifact@v2 + with: + name: pr_num + workflow: ${{ env.WORKFLOW_ID }} + run_id: ${{ env.RUN_ID }} + path: ${{ github.workspace }}\pr - name: Run UI Smoke Tests shell: cmd run: .github\scripts\run_tests.bat ${{ secrets.TEST_EXECUTE_ACCESS_KEY }} Dynamo\Dynamo.pjs DynamoSandbox SmokeTests @@ -50,9 +58,17 @@ jobs: name: UI Smoke Test Report path: reports/report.xml reporter: java-junit + - name: Read Pull Request Number + id: read_pr_number + run: | + "pr_number=$(Get-Content ${{ github.workspace }}\pr\pr_number.txt)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - name: Summary + env: + PR_NUMBER: ${{ steps.read_pr_number.outputs.pr_number }} + PR_URL: ${{ format('{0}/{1}/pull', github.server_url, github.repository) }} if: always() run: | - Get-Content summary.md >> $env:GITHUB_STEP_SUMMARY - Write-Output "Actor: @${{ env.ACTOR }}" >> $env:GITHUB_STEP_SUMMARY - Write-Output "Workflow Run: [${{ env.RUN_NAME }}](${{ env.RUN_URL }})" >> $env:GITHUB_STEP_SUMMARY + Get-Content summary.md | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + "Actor: @$env:ACTOR" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + "Workflow Run: [$env:RUN_NAME]($env:RUN_URL)" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append + "Pull Request: [$env:PR_NUMBER]($env:PR_URL/$env:PR_NUMBER)" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append