#48 add framework reference. (#49)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20d60f9..e358e3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml
@@ -25,26 +25,22 @@ build: strategy: matrix: - dotnet: [6.0.201] - os: [ubuntu-latest, macos-latest, windows-latest] - include: - - dotnet: 5.0.406 - os: ubuntu-latest + os: [ubuntu-22.04, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Support longpaths if: ${{ matrix.os == 'windows-latest'}} run: git config --system core.longpaths true - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.2.2 with: submodules: true - name: Set Skip Env Var uses: ./.github/actions/skip-ci - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v2.1.0 + uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: 9.0.302 - name: Build with dotnet if: env.SKIP_CI != 'true'
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index a2377e1..61fd58b 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml
@@ -23,17 +23,19 @@ jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.2.2 with: submodules: true - name: Set Skip Env Var uses: ./.github/actions/skip-ci - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v2.1.0 + uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: 5.0.406 + dotnet-version: | + 5.0.406 + 9.0.302 - name: Unit Test with dotnet run: |
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a6a8d57..27c7ee7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml
@@ -24,7 +24,7 @@ jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -33,7 +33,7 @@ steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4.2.2 with: submodules: true @@ -41,9 +41,9 @@ uses: ./.github/actions/skip-ci - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v2.1.0 + uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: 6.0.201 + dotnet-version: 9.0.302 - name: Initialize CodeQL uses: github/codeql-action/init@v2
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index d66f2dc..b13c45e 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml
@@ -30,9 +30,9 @@ # - zookeeper # - consul # - nacos - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.2.2 with: submodules: true @@ -41,9 +41,9 @@ - name: Setup .NET Core SDK if: env.SKIP_CI != 'true' - uses: actions/setup-dotnet@v2.1.0 + uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: 5.0.406 + dotnet-version: 9.0.302 - name: Build with dotnet if: env.SKIP_CI != 'true' @@ -55,9 +55,12 @@ cd ./examples/AspNetCoreExample/ docker build -t dotnet-example . - - name: Start Docker Compose + - name: Run docker compose if: env.SKIP_CI != 'true' - run: docker-compose -f ./build/docker-compose-${{ matrix.case }}.yml up -d + uses: hoverkraft-tech/compose-action@v2.0.1 + with: + compose-file: ./build/docker-compose-${{ matrix.case }}.yml + up-flags: -d # replace with check health step - name: Run tests
diff --git a/client/Apache.ShenYu.AspNetCore/Apache.ShenYu.AspNetCore.csproj b/client/Apache.ShenYu.AspNetCore/Apache.ShenYu.AspNetCore.csproj index 07cc4ba..46fc64c 100644 --- a/client/Apache.ShenYu.AspNetCore/Apache.ShenYu.AspNetCore.csproj +++ b/client/Apache.ShenYu.AspNetCore/Apache.ShenYu.AspNetCore.csproj
@@ -15,7 +15,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>netstandard2.0;net461</TargetFrameworks> + <TargetFrameworks>netstandard2.0;net461;net6.0</TargetFrameworks> <Version>1.0.0</Version> <FileVersion>$(Version)</FileVersion> <Company>Apache Software Foundation</Company> @@ -39,7 +39,11 @@ <ProjectReference Include="..\Apache.ShenYu.Client\Apache.ShenYu.Client.csproj" /> </ItemGroup> - <ItemGroup> + <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0'))"> + <FrameworkReference Include="Microsoft.AspNetCore.App" /> + </ItemGroup> + + <ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0'))"> <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
diff --git a/client/Apache.ShenYu.Client/Apache.ShenYu.Client.csproj b/client/Apache.ShenYu.Client/Apache.ShenYu.Client.csproj index dce303e..467446e 100644 --- a/client/Apache.ShenYu.Client/Apache.ShenYu.Client.csproj +++ b/client/Apache.ShenYu.Client/Apache.ShenYu.Client.csproj
@@ -46,7 +46,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="dotnet-etcd" Version="4.2.0" /> - <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" /> + <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="System.Runtime.Loader" Version="4.3.0" /> <PackageReference Include="ZooKeeperNetEx" Version="3.4.12.4" />