From dcbe444dfa7de2cdfb19e2c18e1e630cfcf8ca3c Mon Sep 17 00:00:00 2001 From: Ilya Kochetkov Date: Sat, 18 Jul 2026 18:56:01 +0400 Subject: [PATCH 1/4] Add CI/CD pipeline configuration for testing and release --- .github/workflows/ci-cd.yml | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/ci-cd.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..2ea68bc --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,70 @@ +name: CI/CD Pipeline + +on: + push: + branches: [ main ] + tags: + - 'v*.*.*' + pull_request: + branches: [ main ] + +jobs: + test: + name: Run Integration Tests + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 9.0.x + 10.0.x + + - name: Restore dependencies + run: dotnet restore src/IlyaKo.AspNet.SideAuth.slnx + + - name: Build solution + run: dotnet build src/IlyaKo.AspNet.SideAuth.slnx --configuration Release --no-restore + + - name: Run tests + run: dotnet test src/IlyaKo.AspNet.SideAuth.slnx --configuration Release --no-build --verbosity normal + + release: + name: Pack & Publish NuGet + needs: test + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Pack NuGet Package + run: dotnet pack src/IlyaKo.AspNet.SideAuth/IlyaKo.AspNet.SideAuth.csproj --configuration Release --output ./output + + - name: Extract Version from Tag + id: get_version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV + + - name: Pack NuGet Package + run: | + dotnet pack src/IlyaKo.AspNet.SideAuth/IlyaKo.AspNet.SideAuth.csproj \ + --configuration Release \ + --output ./output \ + /p:PackageVersion=${{ env.VERSION }} \ + /p:Version=${{ env.VERSION }} + + - name: Push to NuGet.org + run: | + dotnet nuget push ./output/*.nupkg \ + --api-key ${{ secrets.NUGET_API_KEY }} \ + --source https://api.nuget.org/v3/index.json \ + --skip-duplicate From d8e3750414bab3d1e4f8359e644277b7886a7eea Mon Sep 17 00:00:00 2001 From: Ilya Kochetkov Date: Sat, 18 Jul 2026 19:04:03 +0400 Subject: [PATCH 2/4] enabled TestingPlatformDotnetTestSupport property --- .../IlyaKo.AspNet.SideAuth.IntegrationTests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj b/src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj index 68842fe..e858f5e 100644 --- a/src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj +++ b/src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj @@ -8,6 +8,7 @@ true true $(InterceptorsNamespaces);Microsoft.AspNetCore.OpenApi.Generated + true From aa7bf8e9088d0a390e850bf5b42ba61f56afbc4f Mon Sep 17 00:00:00 2001 From: Ilya Kochetkov Date: Sat, 18 Jul 2026 19:09:06 +0400 Subject: [PATCH 3/4] Limit CI tests to integration test project only --- .github/workflows/ci-cd.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2ea68bc..987bcc0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -30,7 +30,11 @@ jobs: run: dotnet build src/IlyaKo.AspNet.SideAuth.slnx --configuration Release --no-restore - name: Run tests - run: dotnet test src/IlyaKo.AspNet.SideAuth.slnx --configuration Release --no-build --verbosity normal + run: | + dotnet test src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj \ + --configuration Release \ + --no-build \ + --verbosity normal release: name: Pack & Publish NuGet From d5e383efe3cd3e8b3ccce202ba5e946c141251c4 Mon Sep 17 00:00:00 2001 From: Ilya Kochetkov Date: Sat, 18 Jul 2026 19:14:22 +0400 Subject: [PATCH 4/4] refine test job --- .github/workflows/ci-cd.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 987bcc0..349473d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -29,12 +29,11 @@ jobs: - name: Build solution run: dotnet build src/IlyaKo.AspNet.SideAuth.slnx --configuration Release --no-restore - - name: Run tests + - name: Run Integration Tests run: | - dotnet test src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj \ + dotnet run --project src/IlyaKo.AspNet.SideAuth.IntegrationTests/IlyaKo.AspNet.SideAuth.IntegrationTests.csproj \ --configuration Release \ - --no-build \ - --verbosity normal + --no-build release: name: Pack & Publish NuGet