From bcc2cd6d1db415c6490644c14b70b0ce0a1c3d42 Mon Sep 17 00:00:00 2001 From: Thomas Nymand Date: Wed, 1 Jul 2026 08:50:39 +0200 Subject: [PATCH 1/2] REF-10 Add GitHub Actions CI pipeline Build the dk.nita.saml20 solution with MSBuild on windows-latest and run the NUnit 2.6.4 test suite, publishing results as an artifact. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..adcc611 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +# REF-10: Continuous integration for OIOSAML.Net +# +# Builds the dk.nita.saml20 solution and runs the NUnit test suite. +# Runs on Windows because the projects target .NET Framework 4.7.2 and +# build with MSBuild (there is no cross-platform `dotnet build` path). +name: CI + +on: + push: + branches: [master, develop, 'feature/**'] + pull_request: + branches: [master, develop] + workflow_dispatch: + +env: + SOLUTION: src/dk.nita.saml20/dk.nita.saml20.sln + CONFIGURATION: Release + PLATFORM: Any CPU + +jobs: + build-and-test: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages + run: nuget restore "$env:SOLUTION" + + - name: Build solution + run: msbuild "$env:SOLUTION" /m /p:Configuration="$env:CONFIGURATION" /p:Platform="$env:PLATFORM" + + # The test project references NUnit 2.6.4, so use the matching + # NUnit 2.6.4 console runner to execute the compiled test assembly. + - name: Install NUnit 2.6.4 console runner + run: nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory tools + + - name: Run tests + run: > + tools/NUnit.Runners.2.6.4/tools/nunit-console.exe + "src/dk.nita.saml20/dk.nita.test.saml20/bin/Release/dk.nita.test.saml20.dll" + /xml:TestResult.xml + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: nunit-test-results + path: TestResult.xml From cf43c52577a34e97907052c4808f05ecf93ec061 Mon Sep 17 00:00:00 2001 From: Thomas Nymand Date: Wed, 1 Jul 2026 09:00:36 +0200 Subject: [PATCH 2/2] REF-10 Scope CI build to exclude IdentityProviderDemo Build via a solution filter (dk.nita.saml20.ci.slnf) covering every project except IdentityProviderDemo; WebsiteDemo is kept in the build. Restore still runs against the full solution. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 7 +++++-- src/dk.nita.saml20/dk.nita.saml20.ci.slnf | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/dk.nita.saml20/dk.nita.saml20.ci.slnf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adcc611..06c3a1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,9 @@ on: env: SOLUTION: src/dk.nita.saml20/dk.nita.saml20.sln + # Solution filter that builds every project except IdentityProviderDemo + # (WebsiteDemo is intentionally kept in the build). + BUILD_FILTER: src/dk.nita.saml20/dk.nita.saml20.ci.slnf CONFIGURATION: Release PLATFORM: Any CPU @@ -34,8 +37,8 @@ jobs: - name: Restore NuGet packages run: nuget restore "$env:SOLUTION" - - name: Build solution - run: msbuild "$env:SOLUTION" /m /p:Configuration="$env:CONFIGURATION" /p:Platform="$env:PLATFORM" + - name: Build (all projects except IdentityProviderDemo) + run: msbuild "$env:BUILD_FILTER" /m /p:Configuration="$env:CONFIGURATION" /p:Platform="$env:PLATFORM" # The test project references NUnit 2.6.4, so use the matching # NUnit 2.6.4 console runner to execute the compiled test assembly. diff --git a/src/dk.nita.saml20/dk.nita.saml20.ci.slnf b/src/dk.nita.saml20/dk.nita.saml20.ci.slnf new file mode 100644 index 0000000..59ab213 --- /dev/null +++ b/src/dk.nita.saml20/dk.nita.saml20.ci.slnf @@ -0,0 +1,13 @@ +{ + "solution": { + "path": "dk.nita.saml20.sln", + "projects": [ + "dk.nita.saml20\\dk.nita.saml20.csproj", + "dk.nita.saml20.ext.audit.log4net\\dk.nita.saml20.ext.audit.log4net.csproj", + "dk.nita.saml20.ext.sessionstore.sqlserver\\dk.nita.saml20.ext.sessionstore.sqlserver.csproj", + "dk.nita.test.saml20\\dk.nita.test.saml20.csproj", + "IntegrationTest\\IntegrationTest.csproj", + "WebsiteDemo\\WebsiteDemo.csproj" + ] + } +}