diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 101d402..d3b09e9 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -5,7 +5,7 @@ on: jobs: build-extension: runs-on: ubuntu-latest - env: + env: DOTNET_NOLOGO: true DOTNET_CLI_TELEMETRY_OPTOUT: true RepositoryUrl: 'https://github.com/${{ github.repository }}' @@ -18,23 +18,23 @@ jobs: PackageReleaseNotes: 'https://github.com/${{ github.repository }}/releases' ContinuousIntegrationBuild: true steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core 7 + - uses: actions/checkout@v2 + - name: Setup .NET Core 8 uses: actions/setup-dotnet@v1 with: - dotnet-version: '7.0' + dotnet-version: '8.0' - name: Calculate next version uses: cezarypiatek/NextVersionGeneratorAction@0.4 with: minor-pattern: '.*' major-pattern: 'BREAKING CHANGES' - output-to-env-variable: 'VersionPrefix' + output-to-env-variable: 'VersionPrefix' - name: Restore dependencies run: | dotnet nuget locals all --clear dotnet restore ${{ env.SolutionPath }} - name: Build extension - run: dotnet build ${{ env.SolutionPath }} -maxcpucount:1 + run: dotnet build ${{ env.SolutionPath }} -maxcpucount:1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Build docker diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1ac9a3..6ac9537 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,10 +24,10 @@ jobs: PackageLicenseExpression: 'MIT' steps: - uses: actions/checkout@v2 - - name: Setup .NET Core 7 + - name: Setup .NET Core 8 uses: actions/setup-dotnet@v1 with: - dotnet-version: '7.0' + dotnet-version: '8.0' - name: Calculate next version uses: cezarypiatek/NextVersionGeneratorAction@0.4 with: @@ -41,7 +41,7 @@ jobs: shell: pwsh - name: Build extension run: | - dotnet build $env:SolutionPath -maxcpucount:1 + dotnet build $env:SolutionPath -maxcpucount:1 shell: pwsh - name: Generate release note run: | diff --git a/src/GrpcMockServer/GrpcMockServer.csproj b/src/GrpcMockServer/GrpcMockServer.csproj index b7daede..dc6eb2e 100644 --- a/src/GrpcMockServer/GrpcMockServer.csproj +++ b/src/GrpcMockServer/GrpcMockServer.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable false @@ -22,8 +22,8 @@ - - + + diff --git a/src/GrpcTestKit.Demo/GrpcTestKit.Demo.csproj b/src/GrpcTestKit.Demo/GrpcTestKit.Demo.csproj index 5b27dba..4cb9c06 100644 --- a/src/GrpcTestKit.Demo/GrpcTestKit.Demo.csproj +++ b/src/GrpcTestKit.Demo/GrpcTestKit.Demo.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable false diff --git a/src/GrpcToRestGenerator/GrpcMockServer.cs b/src/GrpcToRestGenerator/GrpcMockServer.cs index c2ebcc9..628a966 100644 --- a/src/GrpcToRestGenerator/GrpcMockServer.cs +++ b/src/GrpcToRestGenerator/GrpcMockServer.cs @@ -20,6 +20,8 @@ using GrpcTestKit.TestConnectors; using System; using System.Net; +using System.Threading; +using System.Linq; /*MockServerNamespace*/ diff --git a/src/GrpcToRestGenerator/StubHelperBuilder.cs b/src/GrpcToRestGenerator/StubHelperBuilder.cs index 8642153..df3fdf8 100644 --- a/src/GrpcToRestGenerator/StubHelperBuilder.cs +++ b/src/GrpcToRestGenerator/StubHelperBuilder.cs @@ -20,7 +20,12 @@ public string Build(IReadOnlyList proxyBaseClasses) { { { + _stubBuilder.AppendLine("using System;"); _stubBuilder.AppendLine("using GrpcTestKit.TestConnectors;"); + _stubBuilder.AppendLine("using System.Threading;"); + _stubBuilder.AppendLine("using System.Threading.Tasks;"); + _stubBuilder.AppendLine("using System.Linq;"); + _stubBuilder.AppendLine("using System.Collections.Generic;"); if (string.IsNullOrWhiteSpace(_helperNamespace) == false) { _stubBuilder.AppendLine($"namespace {_helperNamespace};"); diff --git a/src/dockerfile b/src/dockerfile index 4dd6e87..4def29b 100644 --- a/src/dockerfile +++ b/src/dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 +FROM mcr.microsoft.com/dotnet/sdk:8.0 ADD ./ /src ADD run.sh /src/run.sh RUN chmod +x /src/run.sh