Skip to content

Commit

Permalink
Merge pull request #230 from thefringeninja/net76
Browse files Browse the repository at this point in the history
Add Support for .NET 7
  • Loading branch information
hayley-jean committed Nov 16, 2022
2 parents 60c26b2 + 715a628 commit e6fe030
Show file tree
Hide file tree
Showing 51 changed files with 66 additions and 492 deletions.
10 changes: 2 additions & 8 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@
"isRoot": true,
"tools": {
"minver-cli": {
"version": "2.2.0",
"version": "4.2.0",
"commands": [
"minver"
]
},
"dotnet-retire": {
"version": "5.0.0",
"commands": [
"dotnet-retire"
]
},
"gpr": {
"version": "0.1.122",
"commands": [
"gpr"
]
}
}
}
}
28 changes: 5 additions & 23 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
strategy:
fail-fast: false
matrix:
framework: [netcoreapp3.1, net5.0, net6.0]
framework: [net5.0, net6.0, net7.0]
os: [ubuntu-latest]
test: [Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement]
configuration: [release]
runs-on: ${{ matrix.os }}
name: EventStore.Client.${{ matrix.test }}/${{ matrix.os }}/${{ matrix.framework }}/${{ inputs.docker-tag }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- shell: bash
run: |
git fetch --prune --unshallow
Expand All @@ -30,12 +30,12 @@ jobs:
run: |
docker pull ghcr.io/eventstore/eventstore:${{ inputs.docker-tag }}
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Compile
shell: bash
run: |
Expand All @@ -47,24 +47,6 @@ jobs:
run: |
./gencert.sh
dotnet test --configuration ${{ matrix.configuration }} --blame \
--logger:"GitHubActions;report-warnings=false" --logger:html --logger:trx --logger:"console;verbosity=normal" \
--results-directory=$(pwd)/test-results/test/EventStore.Client.${{ matrix.test }}.Tests \
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/EventStore.Client.${{ matrix.test }}.Tests
- name: Collect Test Results
shell: bash
if: always()
run: |
echo $(find ./test-results -name "*.html" | xargs cat) > test-results.html
- name: Publish Test Results (HTML)
uses: actions/upload-artifact@v1
if: always()
with:
path: test-results.html
name: test-results-EventStore.Client.${{ matrix.test }}-${{ matrix.os }}-${{ matrix.framework }}-${{ inputs.docker-tag }}.html
- name: Publish Test Results (All)
uses: actions/upload-artifact@v1
if: always()
with:
name: test-results-EventStore.Client.${{ matrix.test }}-${{ matrix.os }}-${{ matrix.framework }}-${{ inputs.docker-tag }}
path: test-results
59 changes: 23 additions & 36 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
strategy:
fail-fast: false
matrix:
framework: [ netcoreapp3.1, net5.0, net6.0 ]
framework: [ net5.0, net6.0, net7.0 ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
name: scan-vulnerabilities/${{ matrix.os }}/${{ matrix.framework }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Scan for Vulnerabilities
shell: bash
run: |
Expand All @@ -38,7 +38,12 @@ jobs:
build-samples:
timeout-minutes: 5
name: build-samples/${{ matrix.framework }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
framework: [ net5.0, net6.0, net7.0 ]
services:
esdb:
image: ghcr.io/eventstore/eventstore:lts
Expand All @@ -52,46 +57,46 @@ jobs:
options: --health-cmd "exit 0"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Compile
shell: bash
run: |
dotnet build samples
- name: Run
shell: bash
run: |
find samples/ -type f -iname "*.csproj" -print0 | xargs -0L1 dotnet run --project
find samples/ -type f -iname "*.csproj" -print0 | xargs -0L1 dotnet run --framework ${{ matrix.framework }} --project
test:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
framework: [netcoreapp3.1, net5.0, net6.0]
framework: [net5.0, net6.0, net7.0]
os: [ubuntu-latest, windows-latest]
configuration: [release]
runs-on: ${{ matrix.os }}
name: test/EventStore.Client/${{ matrix.os }}/${{ matrix.framework }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- shell: bash
run: |
git fetch --prune --unshallow
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Compile
shell: bash
run: |
Expand All @@ -100,27 +105,9 @@ jobs:
shell: bash
run: |
dotnet test --configuration ${{ matrix.configuration }} --blame \
--logger:"GitHubActions;report-warnings=false" --logger:html --logger:trx --logger:"console;verbosity=normal" \
--results-directory=$(pwd)/test-results/test/EventStore.Client.Tests \
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/EventStore.Client.Tests
- name: Collect Test Results
shell: bash
if: always()
run: |
echo $(find ./test-results -name "*.html" | xargs cat) > test-results.html
- name: Publish Test Results (HTML)
uses: actions/upload-artifact@v1
if: always()
with:
path: test-results.html
name: test-results-EventStore.Client-${{ matrix.configuration }}-${{matrix.os}}-${{ matrix.framework }}.html
- name: Publish Test Results (All)
uses: actions/upload-artifact@v1
if: always()
with:
name: test-results-EventStore.Client-${{ matrix.configuration }}-${{matrix.os}}-${{ matrix.framework }}
path: test-results
publish:
timeout-minutes: 5
Expand All @@ -129,25 +116,25 @@ jobs:
name: publish
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Get Version
id: get_version
run: |
echo "::set-output name=branch::${GITHUB_REF:10}"
echo "branch=${GITHUB_REF:10}" >> $GITHUB_OUTPUT
dotnet nuget list source
dotnet tool restore
version=$(dotnet tool run minver -- --tag-prefix=v)
echo "::set-output name=version::${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
- shell: bash
run: |
git fetch --prune --unshallow
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Dotnet Pack
shell: bash
run: |
Expand Down
12 changes: 4 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<Project>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<Platform>x64</Platform>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Nullable>enable</Nullable>
<NullableContextOptions>enable</NullableContextOptions>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>9.0</LangVersion>
<LangVersion>11</LangVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<DebugType Condition=" '$(Configuration)' == 'Debug' ">full</DebugType>
<DebugType Condition=" '$(Configuration)' == 'Release' ">pdbonly</DebugType>
<OutputPath>$(MSBuildThisFileDirectory)\bin\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
<RootNamespace>EventStore.Client</RootNamespace>
<UseLinkBase>true</UseLinkBase>
<GrpcPackageVersion>2.43.0</GrpcPackageVersion>
<GrpcCorePackageVersion>2.44.0</GrpcCorePackageVersion>
<GrpcToolsPackageVersion>2.44.0</GrpcToolsPackageVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>$(DefineConstants);GRPC_CORE</DefineConstants>
<GrpcPackageVersion>2.49.0</GrpcPackageVersion>
<GrpcToolsPackageVersion>2.50.0</GrpcToolsPackageVersion>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
<PropertyGroup>
<Nullable>enable</Nullable>
<NullableContextOptions>enable</NullableContextOptions>
<OutputType>Exe</OutputType>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion samples/appending-events/appending-events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>appending_events</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>connecting_to_a_cluster</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>persistent_subscriptions</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions samples/projection-management/projection-management.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>projection_management</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions samples/quick-start/quick-start.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>quick_start</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions samples/reading-events/reading-events.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>reading_events</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions samples/secure-with-tls/secure-with-tls.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>secure_with_tls</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions samples/server-side-filtering/server-side-filtering.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>server_side_filtering</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>setting_up_dependency_injection</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions samples/subscribing-to-streams/subscribing-to-streams.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>subscribing_to_streams</RootNamespace>
</PropertyGroup>

Expand Down
Loading

0 comments on commit e6fe030

Please sign in to comment.