-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from catcherwong/feat/net6
feat: support newest lts net6.0
- Loading branch information
Showing
5 changed files
with
81 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,54 @@ | ||
name: Build | ||
name: Build_And_Test | ||
|
||
on: | ||
push: | ||
branches: [ dev, main ] | ||
branches: [ dev, main, 'feat/**' ] | ||
pull_request: | ||
branches: [ dev, main ] | ||
|
||
jobs: | ||
|
||
linux: | ||
name: build on linux | ||
runs-on: ubuntu-latest | ||
|
||
name: build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ windows-latest, ubuntu-latest ] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET SDK 6.0.x | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Setup .NET SDK 5.0.x | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Setup .NET SDK 3.1.x | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 5.0.x | ||
dotnet-version: 3.1.x | ||
|
||
- name: Show dotnet Version | ||
run: dotnet --version | ||
- name: Build with dotnet | ||
run: | | ||
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Dtmcli/Dtmcli.csproj | ||
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Dtmcli.Tests/Dtmcli.Tests.csproj | ||
- name: Test with dotnet | ||
dotnet --list-sdks | ||
dotnet --list-runtimes | ||
- name: Build with dotnet | ||
run: | | ||
dotnet build src/Dtmcli/Dtmcli.csproj | ||
- name: Run tests on netcoreapp3.1 | ||
run: | | ||
dotnet test --framework=netcoreapp3.1 src/Dtmcli.Tests/Dtmcli.Tests.csproj | ||
- name: Run tests on net5.0 | ||
run: | | ||
dotnet test --framework=net5.0 src/Dtmcli.Tests/Dtmcli.Tests.csproj | ||
- name: Run tests on net6.0 | ||
run: | | ||
dotnet test src/Dtmcli.Tests/Dtmcli.Tests.csproj --no-restore | ||
dotnet test --framework=net6.0 src/Dtmcli.Tests/Dtmcli.Tests.csproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks> | ||
<PackageProjectUrl>https://github.com/dtm-labs/dtmcli-csharp</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/dtm-labs/dtmcli-csharp</RepositoryUrl> | ||
<AssemblyName>Dtmcli</AssemblyName> | ||
<RootNamespace>Dtmcli</RootNamespace> | ||
<Description>a c# client for distributed transaction framework dtm. 分布式事务管理器dtm的c#客户端</Description> | ||
<VersionPrefix>0.3.0</VersionPrefix> | ||
<VersionSuffix></VersionSuffix> | ||
<Authors>geffzhang</Authors> | ||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Dapper" Version="2.0.123" /> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" /> | ||
<PackageReference Include="System.Text.Json" Version="5.0.2" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks> | ||
<PackageProjectUrl>https://github.com/dtm-labs/dtmcli-csharp</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/dtm-labs/dtmcli-csharp</RepositoryUrl> | ||
<AssemblyName>Dtmcli</AssemblyName> | ||
<RootNamespace>Dtmcli</RootNamespace> | ||
<Description>a c# client for distributed transaction framework dtm. 分布式事务管理器dtm的c#客户端</Description> | ||
<VersionPrefix>0.3.0</VersionPrefix> | ||
<VersionSuffix></VersionSuffix> | ||
<Authors>geffzhang</Authors> | ||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Dapper" Version="2.0.123" /> | ||
<PackageReference Include="System.Text.Json" Version="6.0.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'"> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'"> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |