From 51344583b02628df73c2dfa347b9dd5db24dc820 Mon Sep 17 00:00:00 2001 From: axunonb Date: Fri, 6 Mar 2026 09:20:54 +0100 Subject: [PATCH 1/5] Add .NET 10.0 support and update dependencies - Updated documentation to specify support for .NET 6.0 and .NET 10.0. - Added .NET 10.0 as a target framework in both main and test projects. - Bumped package version to 5.14.0. - Upgraded NuGet dependencies: AngleSharp, MailKit, Microsoft.SourceLink.GitHub, and System.Configuration.ConfigurationManager. - No code changes were made. - Update appveyor.yml --- PkgReadMe.md | 2 +- README.md | 2 +- Src/Directory.Build.props | 4 +- .../MailMergeLib.Tests.csproj | 2 +- Src/MailMergeLib/MailMergeLib.csproj | 10 +-- Src/appveyor.yml | 70 +++++++++++++++++++ appveyor.yml | 12 ++-- 7 files changed, 86 insertions(+), 16 deletions(-) create mode 100644 Src/appveyor.yml diff --git a/PkgReadMe.md b/PkgReadMe.md index afa9d6d..fd370d3 100644 --- a/PkgReadMe.md +++ b/PkgReadMe.md @@ -34,6 +34,6 @@ ### Supported Frameworks * .Net Framework 4.6.2 and later * .Net Standard 2.1 -* NET 6.0 and later +* NET 6.0 and NET 10.0 [![Paypal-Donations](https://img.shields.io/badge/Donate-PayPal-important.svg?style=flat-square)](https://www.paypal.com/donate?hosted_button_id=KSC3LRAR26AHN) diff --git a/README.md b/README.md index 24e9521..b467dee 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ ### Supported Frameworks * .Net Framework 4.6.2 and later * .Net Standard 2.1 -* NET 6.0 and later +* NET 6.0 and NET 10.0 [![Paypal-Donations](https://img.shields.io/badge/Donate-PayPal-important.svg?style=flat-square)](https://www.paypal.com/donate?hosted_button_id=KSC3LRAR26AHN) diff --git a/Src/Directory.Build.props b/Src/Directory.Build.props index 95c7aca..75167f2 100644 --- a/Src/Directory.Build.props +++ b/Src/Directory.Build.props @@ -8,8 +8,8 @@ Copyright 2011-$(CurrentYear) axuno, MailMergeLib Project maintainers and contributers https://github.com/axuno/MailMergeLib.git true - 5.13.0 - 5.13.0 + 5.14.0 + 5.14.0 5.0.0.0 latest true diff --git a/Src/MailMergeLib.Tests/MailMergeLib.Tests.csproj b/Src/MailMergeLib.Tests/MailMergeLib.Tests.csproj index 686fa09..9718306 100644 --- a/Src/MailMergeLib.Tests/MailMergeLib.Tests.csproj +++ b/Src/MailMergeLib.Tests/MailMergeLib.Tests.csproj @@ -3,7 +3,7 @@ Test project for MailMergeLib MailMergeLib.UnitTest - net462;net8.0 + net462;net10.0 false MailMergeLib.Tests ../MailMergeLib/MailMergeLib.snk diff --git a/Src/MailMergeLib/MailMergeLib.csproj b/Src/MailMergeLib/MailMergeLib.csproj index eae01dd..602895d 100644 --- a/Src/MailMergeLib/MailMergeLib.csproj +++ b/Src/MailMergeLib/MailMergeLib.csproj @@ -4,7 +4,7 @@ MailMergeLib is a mail message client library which provides comfortable mail merge capabilities for text, inline images and attachments, as well as good throughput and fault tolerance for sending mail messages. MailMergeLib MailMergeLib - netstandard2.1;net462;net6.0 + netstandard2.1;net462;net6.0;net10.0 true MailMergeLib MailMergeLib.snk @@ -55,12 +55,12 @@ https://github.com/axuno/MailMergeLib/releases - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -68,7 +68,7 @@ https://github.com/axuno/MailMergeLib/releases - + diff --git a/Src/appveyor.yml b/Src/appveyor.yml new file mode 100644 index 0000000..89e3a50 --- /dev/null +++ b/Src/appveyor.yml @@ -0,0 +1,70 @@ +version: 5.0.0.{build} # Only change for mayor versions (e.g. 6.0.0) +environment: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + matrix: + - job_name: windows + appveyor_build_worker_image: Visual Studio 2022 # 2026 is not available yet + - job_name: linux + appveyor_build_worker_image: Ubuntu +matrix: + fast_finish: true +only_commits: + files: + - appveyor.yml + - Src/**/* + +for: + - + matrix: + only: + - job_name: windows + init: + # default is: core.autocrlf input + - git config --global core.autocrlf true + install: + - ps: Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "dotnet-install.ps1" + - ps: .\dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet" + build_script: + - ps: cd $env:APPVEYOR_BUILD_FOLDER\Src + - ps: dotnet --version + - ps: dotnet restore --verbosity quiet + - ps: dotnet add .\MailMergeLib.Tests\MailMergeLib.Tests.csproj package AltCover + - ps: | + $version = "5.14.0" + $versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER} + + if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { + $version = $version + "-PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER + } + dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /p:IncludeSymbols=true /p:ContinuousIntegrationBuild=true /p:Version=$version /p:FileVersion=$versionFile + dotnet pack MailMergeLib.sln --verbosity minimal --no-build --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=$env:APPVEYOR_BUILD_FOLDER/artifacts /p:ContinuousIntegrationBuild=true + test_script: + - cmd: nuget install Appveyor.TestLogger + - cmd: dotnet test --framework net10.0 --test-adapter-path:. --logger:Appveyor MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + - cmd: nuget install codecov -excludeversion + - cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\MailMergeLib.Tests\coverage.net10.0.xml" -n net10.0win + artifacts: + - path: 'artifacts\*.nupkg' + type: NuGetPackage + - path: 'artifacts\*.snupkg' + type: NuGetPackage + deploy: + - provider: NuGet + api_key: $(NUGET_API_KEY) + on: + branch: main + - + matrix: + only: + - job_name: linux + build_script: + - cd $APPVEYOR_BUILD_FOLDER/Src + - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 + - export PATH="$HOME/.dotnet:$PATH" + - dotnet --version + - dotnet restore --verbosity quiet + - dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover + - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 + test_script: + - dotnet test --framework net10.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net10.0.xml -n net10.0linux \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 9f40345..d012b00 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ environment: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true matrix: - job_name: windows - appveyor_build_worker_image: Visual Studio 2022 + appveyor_build_worker_image: Visual Studio 2026 - job_name: linux appveyor_build_worker_image: Ubuntu matrix: @@ -27,7 +27,7 @@ for: - ps: dotnet restore --verbosity quiet - ps: dotnet add .\MailMergeLib.Tests\MailMergeLib.Tests.csproj package AltCover - ps: | - $version = "5.13.0" + $version = "5.14.0" $versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER} if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { @@ -37,9 +37,9 @@ for: dotnet pack MailMergeLib.sln --verbosity minimal --no-build --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=$env:APPVEYOR_BUILD_FOLDER/artifacts /p:ContinuousIntegrationBuild=true test_script: - cmd: nuget install Appveyor.TestLogger - - cmd: dotnet test --framework net8.0 --test-adapter-path:. --logger:Appveyor MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + - cmd: dotnet test --framework net10.0 --test-adapter-path:. --logger:Appveyor MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - cmd: nuget install codecov -excludeversion - - cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\MailMergeLib.Tests\coverage.net8.0.xml" -n net8.0win + - cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\MailMergeLib.Tests\coverage.net10.0.xml" -n net10.0win artifacts: - path: 'artifacts\*.nupkg' type: NuGetPackage @@ -63,5 +63,5 @@ for: - dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 test_script: - - dotnet test --framework net8.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net8.0.xml -n net8.0linux + - dotnet test --framework net10.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net10.0.xml -n net10.0linux From e9a55c6e2c41252105219a62dbc8ae6637aba277 Mon Sep 17 00:00:00 2001 From: axunonb Date: Fri, 6 Mar 2026 10:17:33 +0100 Subject: [PATCH 2/5] Fix appveyor build image --- Src/appveyor.yml | 15 +++++++++++++-- appveyor.yml | 9 ++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Src/appveyor.yml b/Src/appveyor.yml index 89e3a50..612f000 100644 --- a/Src/appveyor.yml +++ b/Src/appveyor.yml @@ -1,9 +1,11 @@ version: 5.0.0.{build} # Only change for mayor versions (e.g. 6.0.0) environment: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_NOLOGO: true matrix: - job_name: windows - appveyor_build_worker_image: Visual Studio 2022 # 2026 is not available yet + appveyor_build_worker_image: Visual Studio 2022 - job_name: linux appveyor_build_worker_image: Ubuntu matrix: @@ -22,8 +24,12 @@ for: # default is: core.autocrlf input - git config --global core.autocrlf true install: + - ps: $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true" + - ps: $env:DOTNET_CLI_TELEMETRY_OPTOUT = "1" + - ps: $env:DOTNET_NOLOGO = "true" - ps: Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "dotnet-install.ps1" - ps: .\dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet" + - ps: dotnet --info > $null build_script: - ps: cd $env:APPVEYOR_BUILD_FOLDER\Src - ps: dotnet --version @@ -57,10 +63,15 @@ for: matrix: only: - job_name: linux + install: + - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true + - export DOTNET_CLI_TELEMETRY_OPTOUT=1 + - export DOTNET_NOLOGO=true build_script: - cd $APPVEYOR_BUILD_FOLDER/Src - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 - export PATH="$HOME/.dotnet:$PATH" + - dotnet --info > /dev/null - dotnet --version - dotnet restore --verbosity quiet - dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover diff --git a/appveyor.yml b/appveyor.yml index d012b00..97221e6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ environment: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true matrix: - job_name: windows - appveyor_build_worker_image: Visual Studio 2026 + appveyor_build_worker_image: Visual Studio 2022 - job_name: linux appveyor_build_worker_image: Ubuntu matrix: @@ -21,6 +21,9 @@ for: init: # default is: core.autocrlf input - git config --global core.autocrlf true + install: + - ps: Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "dotnet-install.ps1" + - ps: .\dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet" build_script: - ps: cd $env:APPVEYOR_BUILD_FOLDER\Src - ps: dotnet --version @@ -56,7 +59,7 @@ for: - job_name: linux build_script: - cd $APPVEYOR_BUILD_FOLDER/Src - - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0 + - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 - export PATH="$HOME/.dotnet:$PATH" - dotnet --version - dotnet restore --verbosity quiet @@ -64,4 +67,4 @@ for: - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 test_script: - dotnet test --framework net10.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net10.0.xml -n net10.0linux + - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net10.0.xml -n net10.0linux \ No newline at end of file From c3eabaa7a8da5ee8fa49bb593635e2e2ef3befab Mon Sep 17 00:00:00 2001 From: axunonb Date: Fri, 6 Mar 2026 13:37:58 +0100 Subject: [PATCH 3/5] Remove appveyor.yml, add build.yml for GitHub --- .github/workflows/build.yml | 62 ++++++++++++++++++++++++++++ Src/appveyor.yml | 81 ------------------------------------- appveyor.yml | 70 -------------------------------- 3 files changed, 62 insertions(+), 151 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 Src/appveyor.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cc5246e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +name: Build and Test + +on: + push: + branches: + - main + - 'pr/**' + paths-ignore: + - '**/*.md' + pull_request: + branches: + - main + paths-ignore: + - '**/*.md' + +env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_NOLOGO: true + VERSION: '5.13.0' + +jobs: + + build-linux: + name: Build and Test (Linux) + runs-on: ubuntu-latest + defaults: + run: + working-directory: Src + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 10.0.x + + - name: Display .NET version + run: dotnet --version + + - name: Restore dependencies + run: dotnet restore --verbosity quiet + + - name: Add AltCover package + run: dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover + + - name: Build solution + run: dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 + + - name: Run tests + run: dotnet test --framework net10.0 --no-build --configuration release MailMergeLib.sln /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./MailMergeLib.Tests/coverage.net10.0.xml + flags: net10.0-linux + name: net10.0-linux + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Src/appveyor.yml b/Src/appveyor.yml deleted file mode 100644 index 612f000..0000000 --- a/Src/appveyor.yml +++ /dev/null @@ -1,81 +0,0 @@ -version: 5.0.0.{build} # Only change for mayor versions (e.g. 6.0.0) -environment: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_NOLOGO: true - matrix: - - job_name: windows - appveyor_build_worker_image: Visual Studio 2022 - - job_name: linux - appveyor_build_worker_image: Ubuntu -matrix: - fast_finish: true -only_commits: - files: - - appveyor.yml - - Src/**/* - -for: - - - matrix: - only: - - job_name: windows - init: - # default is: core.autocrlf input - - git config --global core.autocrlf true - install: - - ps: $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true" - - ps: $env:DOTNET_CLI_TELEMETRY_OPTOUT = "1" - - ps: $env:DOTNET_NOLOGO = "true" - - ps: Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "dotnet-install.ps1" - - ps: .\dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet" - - ps: dotnet --info > $null - build_script: - - ps: cd $env:APPVEYOR_BUILD_FOLDER\Src - - ps: dotnet --version - - ps: dotnet restore --verbosity quiet - - ps: dotnet add .\MailMergeLib.Tests\MailMergeLib.Tests.csproj package AltCover - - ps: | - $version = "5.14.0" - $versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER} - - if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { - $version = $version + "-PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER - } - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /p:IncludeSymbols=true /p:ContinuousIntegrationBuild=true /p:Version=$version /p:FileVersion=$versionFile - dotnet pack MailMergeLib.sln --verbosity minimal --no-build --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=$env:APPVEYOR_BUILD_FOLDER/artifacts /p:ContinuousIntegrationBuild=true - test_script: - - cmd: nuget install Appveyor.TestLogger - - cmd: dotnet test --framework net10.0 --test-adapter-path:. --logger:Appveyor MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - - cmd: nuget install codecov -excludeversion - - cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\MailMergeLib.Tests\coverage.net10.0.xml" -n net10.0win - artifacts: - - path: 'artifacts\*.nupkg' - type: NuGetPackage - - path: 'artifacts\*.snupkg' - type: NuGetPackage - deploy: - - provider: NuGet - api_key: $(NUGET_API_KEY) - on: - branch: main - - - matrix: - only: - - job_name: linux - install: - - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true - - export DOTNET_CLI_TELEMETRY_OPTOUT=1 - - export DOTNET_NOLOGO=true - build_script: - - cd $APPVEYOR_BUILD_FOLDER/Src - - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 - - export PATH="$HOME/.dotnet:$PATH" - - dotnet --info > /dev/null - - dotnet --version - - dotnet restore --verbosity quiet - - dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover - - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 - test_script: - - dotnet test --framework net10.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net10.0.xml -n net10.0linux \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 97221e6..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: 5.0.0.{build} # Only change for mayor versions (e.g. 6.0.0) -environment: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - matrix: - - job_name: windows - appveyor_build_worker_image: Visual Studio 2022 - - job_name: linux - appveyor_build_worker_image: Ubuntu -matrix: - fast_finish: true -only_commits: - files: - - appveyor.yml - - Src/**/* - -for: - - - matrix: - only: - - job_name: windows - init: - # default is: core.autocrlf input - - git config --global core.autocrlf true - install: - - ps: Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "dotnet-install.ps1" - - ps: .\dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet" - build_script: - - ps: cd $env:APPVEYOR_BUILD_FOLDER\Src - - ps: dotnet --version - - ps: dotnet restore --verbosity quiet - - ps: dotnet add .\MailMergeLib.Tests\MailMergeLib.Tests.csproj package AltCover - - ps: | - $version = "5.14.0" - $versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER} - - if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { - $version = $version + "-PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER - } - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /p:IncludeSymbols=true /p:ContinuousIntegrationBuild=true /p:Version=$version /p:FileVersion=$versionFile - dotnet pack MailMergeLib.sln --verbosity minimal --no-build --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=$env:APPVEYOR_BUILD_FOLDER/artifacts /p:ContinuousIntegrationBuild=true - test_script: - - cmd: nuget install Appveyor.TestLogger - - cmd: dotnet test --framework net10.0 --test-adapter-path:. --logger:Appveyor MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - - cmd: nuget install codecov -excludeversion - - cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\MailMergeLib.Tests\coverage.net10.0.xml" -n net10.0win - artifacts: - - path: 'artifacts\*.nupkg' - type: NuGetPackage - - path: 'artifacts\*.snupkg' - type: NuGetPackage - deploy: - - provider: NuGet - api_key: $(NUGET_API_KEY) - on: - branch: main - - - matrix: - only: - - job_name: linux - build_script: - - cd $APPVEYOR_BUILD_FOLDER/Src - - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 - - export PATH="$HOME/.dotnet:$PATH" - - dotnet --version - - dotnet restore --verbosity quiet - - dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover - - dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 - test_script: - - dotnet test --framework net10.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - - bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net10.0.xml -n net10.0linux \ No newline at end of file From 4e5a9018bbdc6e45f6f086abb2025ffc29f54ec3 Mon Sep 17 00:00:00 2001 From: axunonb Date: Fri, 6 Mar 2026 13:47:18 +0100 Subject: [PATCH 4/5] Add Windows builds and tests --- .github/workflows/build.yml | 78 ++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc5246e..5d9489a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: build-linux: name: Build and Test (Linux) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 # ubuntu-24.04 does not include mono needed for net4x tests defaults: run: working-directory: Src @@ -60,3 +60,79 @@ jobs: flags: net10.0-linux name: net10.0-linux token: ${{ secrets.CODECOV_TOKEN }} + + + build-windows: + name: Build and Test (Windows) + runs-on: windows-2022 + defaults: + run: + working-directory: Src + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Configure Git line endings + run: git config --global core.autocrlf true + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 10.0.x + + - name: Display .NET version + run: dotnet --version + + - name: Restore dependencies + run: dotnet restore --verbosity quiet + + - name: Add AltCover package + run: dotnet add .\MailMergeLib.Tests\MailMergeLib.Tests.csproj package AltCover + + - name: Determine version + id: version + shell: pwsh + run: | + $version = "${{ env.VERSION }}" + $versionFile = "$version.${{ github.run_number }}" + + if ("${{ github.event_name }}" -eq "pull_request") { + $version = "$version-PR${{ github.event.pull_request.number }}" + } + + echo "VERSION=$version" >> $env:GITHUB_OUTPUT + echo "FILE_VERSION=$versionFile" >> $env:GITHUB_OUTPUT + echo "Package version: $version" + echo "File version: $versionFile" + + - name: Build solution + run: dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /p:IncludeSymbols=true /p:ContinuousIntegrationBuild=true /p:Version=${{ steps.version.outputs.VERSION }} /p:FileVersion=${{ steps.version.outputs.FILE_VERSION }} + + - name: Run tests + run: dotnet test --framework net10.0 --no-build --configuration release MailMergeLib.sln /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./Src/MailMergeLib.Tests/coverage.net10.0.xml + flags: net10.0-windows + name: net10.0-windows + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Pack NuGet packages + run: dotnet pack MailMergeLib.sln --verbosity minimal --no-build --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=${{ github.workspace }}/artifacts /p:ContinuousIntegrationBuild=true + + - name: Upload NuGet packages as artifacts + uses: actions/upload-artifact@v7 + with: + name: nuget-packages + path: | + artifacts/*.nupkg + artifacts/*.snupkg + retention-days: 30 + + - name: Publish to NuGet + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate From 310432974b8f642dd4ac09b163f512b84c9a4d3e Mon Sep 17 00:00:00 2001 From: axunonb Date: Fri, 6 Mar 2026 14:02:02 +0100 Subject: [PATCH 5/5] Add net462 unit tests --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d9489a..854788a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_NOLOGO: true - VERSION: '5.13.0' + VERSION: '5.14.0' jobs: @@ -109,8 +109,11 @@ jobs: - name: Build solution run: dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /p:IncludeSymbols=true /p:ContinuousIntegrationBuild=true /p:Version=${{ steps.version.outputs.VERSION }} /p:FileVersion=${{ steps.version.outputs.FILE_VERSION }} - - - name: Run tests + + - name: Run tests (net462) + run: dotnet test --framework net462 --no-build --configuration release MailMergeLib.sln /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" + + - name: Run tests (net10.0) run: dotnet test --framework net10.0 --no-build --configuration release MailMergeLib.sln /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true" - name: Upload coverage to Codecov