Skip to content

Commit

Permalink
feature: update to .net 9
Browse files Browse the repository at this point in the history
  • Loading branch information
abigailarmijohernandez committed Nov 20, 2024
1 parent a8e8869 commit f82e84d
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 80 deletions.
Binary file modified .DS_Store
Binary file not shown.
77 changes: 38 additions & 39 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
22 changes: 11 additions & 11 deletions CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand All @@ -13,30 +13,30 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="SpecFlow.MsTest" Version="3.9.74" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.74" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.10" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="8.0.2" />
<PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
</ItemGroup>
Expand Down
25 changes: 25 additions & 0 deletions CaducaRest.IntegrationTest/CaducaRest.IntegrationTest.sln
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Playwright" Version="1.47.0" />
<PackageReference Include="Microsoft.Playwright" Version="1.48.0" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Allure" Version="1.2.1.1" />
Expand Down
4 changes: 2 additions & 2 deletions CaducaRest.UITest/CaducaRest.UITest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Selenium.WebDriver" Version="4.25.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.26.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions CaducaRest.UITest/GoogleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions CaducaRest.UnitTest/CaducaRest.UnitTest.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
30 changes: 15 additions & 15 deletions CaducaRest/CaducaRest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>4821bfa0-0c24-48a7-9e2f-4954d0a2b042</UserSecretsId>
<DockerComposeProjectPath>../docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
Expand Down Expand Up @@ -38,26 +38,26 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.10" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.0.0" />
<PackageReference Include="Microsoft.OData.Core" Version="8.1.0" />
<PackageReference Include="HotChocolate.AspNetCore" Version="14.0.0" />
<PackageReference Include="HotChocolate.Data.EntityFramework" Version="14.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.1.1" />
<PackageReference Include="Microsoft.OData.Core" Version="8.2.2" />
<PackageReference Include="HotChocolate.AspNetCore" Version="14.1.0" />
<PackageReference Include="HotChocolate.Data.EntityFramework" Version="14.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MySql.Data" Version="9.1.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions specflow-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f82e84d

Please sign in to comment.