From f82e84def400bc5dc5b6a1647665f4015691a6ee Mon Sep 17 00:00:00 2001 From: abigailarmijohernandez Date: Tue, 19 Nov 2024 22:12:55 -0600 Subject: [PATCH] feature: update to .net 9 --- .DS_Store | Bin 10244 -> 10244 bytes .github/workflows/dotnet.yml | 77 +++++++++--------- .../CaducaRest.IntegrationTest.csproj | 22 ++--- .../CaducaRest.IntegrationTest.sln | 25 ++++++ .../CaducaRest.PlayWright.UITest.csproj | 6 +- CaducaRest.UITest/CaducaRest.UITest.csproj | 4 +- CaducaRest.UITest/GoogleTest.cs | 4 +- .../CaducaRest.UnitTest.csproj | 6 +- CaducaRest/CaducaRest.csproj | 30 +++---- azure-pipelines.yml | 6 +- specflow-pipelines.yml | 4 +- 11 files changed, 104 insertions(+), 80 deletions(-) create mode 100644 CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.sln diff --git a/.DS_Store b/.DS_Store index 26024b359cf17f9f4fc6293fdc07a35d5a04dc43..3594509cff1957d81a46bf284ab5ebaa3135cf41 100644 GIT binary patch delta 703 zcmZn(XbG6$XEU^hRb=42iLiFjt-kTeDc1{MZAhIEEZhLYTT7nh`*{3M_lM-9)x zIRZ(?98u*{@X8lt7zQWj=N16aW{MDADAZMYOlberl91d0DK3s} za-q1$S=hQn1t-53vzcr! z#=}t&(~->!j2o~(Kf1tuF&<{NnGTcRiB+?(SgCVPekiU6(#FP?bM=SP`PiFn4Z1<4Ey3@i+K4CxG+3?;ewE-pzq`AI-A4xei0 z8Pdi_9Z}^|@X8lt7zQWj=N16KZZN4Jp&B(%LX<0n^ zfsn=IXb~Qcz?tbw6o3YS1w18D1q6`Y%jWCA08+KtS~P@_g@N_!q{;Q-Hj~eb@o?)+0Cr~CTvV(WZ%rL P@QY>gMA3gVb+#%17|5&j diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8a422fcb..eefbd12c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -2,53 +2,52 @@ name: .NET on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: build: - runs-on: ubuntu-latest env: MARIA: ${{secrets.MARIA}} JUAN: ${{secrets.JUAN}} CARLOS: ${{secrets.CARLOS}} steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 8.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Install Playwright CLI - run: dotnet tool install --global Microsoft.Playwright.CLI - - name: Install playwright - run: playwright install - - name: Install Lving Doc - run: dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI - - name: Test - run: dotnet test ${GITHUB_WORKSPACE}/CaducaRest.PlayWright.UITest/*.csproj --logger "html;logfilename=testResults.html" - - uses: actions/upload-artifact@v3 - with: - name: playwright - path: ${{ github.workspace }}/CaducaRest.PlayWright.UITest/TestResults/testResults.html - - name: Test Integration - run: dotnet test ${GITHUB_WORKSPACE}/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj - - name: Generate living doc - if: always() - run: livingdoc test-assembly ${{ github.workspace }}/CaducaRest.IntegrationTest/bin/Debug/net8.0/CaducaRest.IntegrationTest.dll -t ${{ github.workspace }}/CaducaRest.IntegrationTest/bin/Debug/net8.0/TestExecution.json --output ${{ github.workspace }}/TestResults/index.html - - uses: actions/upload-artifact@v3 - with: - name: specflow - if: always() - path: ${{ github.workspace }}/TestResults/index.html - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 9.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Install Playwright CLI + run: dotnet tool install --global Microsoft.Playwright.CLI + - name: Install playwright + run: playwright install + - name: Install Living Doc + run: dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI + - name: Test + run: dotnet test ${GITHUB_WORKSPACE}/CaducaRest.PlayWright.UITest/*.csproj --logger "html;logfilename=testResults.html" + - uses: actions/upload-artifact@v3 + with: + name: playwright + path: ${{ github.workspace }}/CaducaRest.PlayWright.UITest/TestResults/testResults.html + - name: Test Integration + run: dotnet test ${GITHUB_WORKSPACE}/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj + - name: Generate living doc if: always() - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ github.workspace }}/TestResults/ + run: livingdoc test-assembly ${{ github.workspace }}/CaducaRest.IntegrationTest/bin/Debug/net8.0/CaducaRest.IntegrationTest.dll -t ${{ github.workspace }}/CaducaRest.IntegrationTest/bin/Debug/net8.0/TestExecution.json --output ${{ github.workspace }}/TestResults/index.html + - uses: actions/upload-artifact@v3 + with: + name: specflow + if: always() + path: ${{ github.workspace }}/TestResults/index.html + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + if: always() + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ github.workspace }}/TestResults/ diff --git a/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj b/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj index 37f4b496..257a2625 100644 --- a/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj +++ b/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 false @@ -13,30 +13,30 @@ - - - + + + - + - + - - + + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.sln b/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.sln new file mode 100644 index 00000000..da508951 --- /dev/null +++ b/CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaducaRest.IntegrationTest", "CaducaRest.IntegrationTest.csproj", "{D3797C04-16B0-478E-A072-0DAE45455F1A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D3797C04-16B0-478E-A072-0DAE45455F1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3797C04-16B0-478E-A072-0DAE45455F1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3797C04-16B0-478E-A072-0DAE45455F1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3797C04-16B0-478E-A072-0DAE45455F1A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AD67F67D-A4FC-4B72-87F4-5DDCF3F5D737} + EndGlobalSection +EndGlobal diff --git a/CaducaRest.PlayWright.UITest/CaducaRest.PlayWright.UITest.csproj b/CaducaRest.PlayWright.UITest/CaducaRest.PlayWright.UITest.csproj index ddc10b62..69ed4dbe 100644 --- a/CaducaRest.PlayWright.UITest/CaducaRest.PlayWright.UITest.csproj +++ b/CaducaRest.PlayWright.UITest/CaducaRest.PlayWright.UITest.csproj @@ -1,17 +1,17 @@ - net8.0 + net9.0 false - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/CaducaRest.UITest/CaducaRest.UITest.csproj b/CaducaRest.UITest/CaducaRest.UITest.csproj index 2cc2e198..3037211e 100644 --- a/CaducaRest.UITest/CaducaRest.UITest.csproj +++ b/CaducaRest.UITest/CaducaRest.UITest.csproj @@ -11,8 +11,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/CaducaRest.UITest/GoogleTest.cs b/CaducaRest.UITest/GoogleTest.cs index 3308582b..64312c65 100644 --- a/CaducaRest.UITest/GoogleTest.cs +++ b/CaducaRest.UITest/GoogleTest.cs @@ -4,8 +4,8 @@ using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.DevTools; -using OpenQA.Selenium.DevTools.V129.Performance; -using Network = OpenQA.Selenium.DevTools.V129.Network; +using OpenQA.Selenium.DevTools.V130.Performance; +using Network = OpenQA.Selenium.DevTools.V130.Network; namespace CaducaRest.UITest; public class Tests : IDisposable diff --git a/CaducaRest.UnitTest/CaducaRest.UnitTest.csproj b/CaducaRest.UnitTest/CaducaRest.UnitTest.csproj index efc43c39..54bc51cb 100644 --- a/CaducaRest.UnitTest/CaducaRest.UnitTest.csproj +++ b/CaducaRest.UnitTest/CaducaRest.UnitTest.csproj @@ -1,20 +1,20 @@ - net8.0 + net9.0 false - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/CaducaRest/CaducaRest.csproj b/CaducaRest/CaducaRest.csproj index 01f235b6..d585a52e 100644 --- a/CaducaRest/CaducaRest.csproj +++ b/CaducaRest/CaducaRest.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 4821bfa0-0c24-48a7-9e2f-4954d0a2b042 ../docker-compose.dcproj @@ -38,26 +38,26 @@ - - - - - + + + + - - - - - - - - + + + + + + + + - + runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dec59bfa..350e81de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,9 +22,9 @@ variables: steps: - task: UseDotNet@2 - displayName: "Instalar .NET Core 8.0.x" + displayName: "Instalar .NET Core 9.0.x" inputs: - version: "8.0.x" + version: "9.0.x" performMultiLevelLookup: true packageType: sdk @@ -72,7 +72,7 @@ steps: testExecutionJson: '$(Build.SourcesDirectory)\CaducaRest.IntegrationTest\bin\Release\net8.0\TestExecution.json' projectLanguage: "es" - - task: PublishCodeCoverageResults@1 + - task: PublishCodeCoverageResults@2 displayName: "Publish code coverage report" inputs: codeCoverageTool: "Cobertura" diff --git a/specflow-pipelines.yml b/specflow-pipelines.yml index 87c2ed30..12bf3377 100644 --- a/specflow-pipelines.yml +++ b/specflow-pipelines.yml @@ -16,9 +16,9 @@ variables: steps: - task: UseDotNet@2 - displayName: "Instalar .NET Core 6.0.x" + displayName: "Instalar .NET Core 9.0.x" inputs: - version: '6.0.x' + version: '9.0.x' performMultiLevelLookup: true packageType: sdk installationPath: $(Agent.ToolsDirectory)/dotnet