From 17272c78961dca9c9598f4801aa44cf8a7cce438 Mon Sep 17 00:00:00 2001 From: Aabishkar KC Date: Tue, 13 Aug 2024 10:30:38 -0400 Subject: [PATCH] DYN-7152 Update build dynamo workflow (#15410) --- .github/workflows/build_dynamo_all.yml | 9 +++---- .github/workflows/dynamo_api_break.yml | 37 -------------------------- .github/workflows/ui_smoke_tests.yml | 8 +++--- README.md | 4 +-- 4 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/dynamo_api_break.yml diff --git a/.github/workflows/build_dynamo_all.yml b/.github/workflows/build_dynamo_all.yml index 685ff5e618a..770b0fae503 100644 --- a/.github/workflows/build_dynamo_all.yml +++ b/.github/workflows/build_dynamo_all.yml @@ -1,5 +1,4 @@ -# Build DynamoAll.sln with .NET 8.0 -name: Build DynamoAll.sln net8.0 +name: Build DynamoAll.sln on: push: @@ -8,7 +7,8 @@ on: pull_request: jobs: - build: + build_and_analyze: + name: Build and Analyze runs-on: windows-latest steps: - name: Checkout Dynamo Repo @@ -29,8 +29,7 @@ jobs: dotnet restore ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 - name: Build Dynamo with MSBuild for Windows run: | - Write-Output "***Continue with the build, Good luck developer!***" - msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release + msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release /warnAsError:RS0016,RS0017 /p:PublicApiAnalyzers=true - name: Look for DynamoCLI.exe run: | Write-Output "***Locating DynamoCLI.exe!***" diff --git a/.github/workflows/dynamo_api_break.yml b/.github/workflows/dynamo_api_break.yml deleted file mode 100644 index f07fdb93c21..00000000000 --- a/.github/workflows/dynamo_api_break.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: API Break Analysis - -on: - pull_request: - types: - - opened - - synchronize - -jobs: - analyze: - runs-on: windows-latest - - steps: - - name: Checkout Dynamo Repo - uses: actions/checkout@v4 - with: - path: Dynamo - repository: DynamoDS/Dynamo - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Setup msbuild - uses: microsoft/setup-msbuild@v2 - - - name: Install dependencies for windows runtime - run: | - dotnet restore ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 - - - name: Build and analyze - run: | - Write-Output "***Continue with the build, Good luck developer!***" - msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release /warnAsError:RS0016,RS0017 /p:PublicApiAnalyzers=true - - diff --git a/.github/workflows/ui_smoke_tests.yml b/.github/workflows/ui_smoke_tests.yml index 960409924e1..e21abfbfcce 100644 --- a/.github/workflows/ui_smoke_tests.yml +++ b/.github/workflows/ui_smoke_tests.yml @@ -3,7 +3,7 @@ name: UI Smoke Tests on: workflow_run: workflows: - - Build DynamoAll.sln net8.0 + - Build DynamoAll.sln types: - completed @@ -13,6 +13,7 @@ env: 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 }} + CHECK_NAME: UI Smoke Tests jobs: ui_smoke_tests: @@ -49,7 +50,6 @@ jobs: - 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 Tests shell: cmd run: .\utils\run_tests.bat ${{ secrets.SMARTBEAR_ACCESS_KEY }} Dynamo\Dynamo.pjs DynamoSandbox SmokeTests ${{ github.workspace }}\build @@ -84,7 +84,7 @@ jobs: id: create_comment run: | $pr_comment=@" - ## UI Smoke Tests + ## $env:CHECK_NAME 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) }}) @@ -98,7 +98,7 @@ jobs: with: issue-number: ${{ env.PR_NUMBER }} comment-author: github-actions[bot] - body-includes: UI Smoke Tests + body-includes: ${{ env.CHECK_NAME }} direction: last - name: Create comment if: env.PR_NUMBER != '' && steps.find_comment.outputs.comment-id == '' diff --git a/README.md b/README.md index b3c41da8d38..ae304593732 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Dynamo -[![Build DynamoAll.sln net8.0](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_all.yml/badge.svg)](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_all.yml) -[![Build DynamoCore.sln](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_core_windows.yml/badge.svg)](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_core.yml) +[![Build DynamoAll.sln](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_all.yml/badge.svg)](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_all.yml) +[![Build DynamoCore.sln](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_core.yml/badge.svg)](https://github.com/DynamoDS/Dynamo/actions/workflows/build_dynamo_core.yml) [![DynamoCoreRuntime](https://img.shields.io/github/v/release/DynamoDS/Dynamo?logo=github&label=DynamoCoreRuntime)](https://github.com/DynamoDS/Dynamo/releases/latest) [![Nuget](https://img.shields.io/nuget/v/DynamoVisualProgramming.Core?logo=nuget)](https://www.nuget.org/packages/DynamoVisualProgramming.Core)