diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
new file mode 100644
index 0000000..12262f5
--- /dev/null
+++ b/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-reportgenerator-globaltool": {
+ "version": "5.1.22",
+ "commands": [
+ "reportgenerator"
+ ]
+ }
+ }
+}
diff --git a/.editorconfig b/.editorconfig
index 46779ac..906e425 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -16,7 +16,7 @@ indent_size = 2
[*.{sln}]
indent_style = tab
-[*.{json,yml}]
+[*.{json,yml,xml,runsettings}]
indent_size = 2
[*.{cs,tt}]
diff --git a/.gitignore b/.gitignore
index d296008..263ae55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -370,3 +370,4 @@ __pycache__/
temp/
tmp/
+etc/coverage/
diff --git a/NCrontab.Tests/.runsettings b/NCrontab.Tests/.runsettings
new file mode 100644
index 0000000..cc74b6b
--- /dev/null
+++ b/NCrontab.Tests/.runsettings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/NCrontab.Tests/NCrontab.Tests.csproj b/NCrontab.Tests/NCrontab.Tests.csproj
index b2dc264..93a9924 100644
--- a/NCrontab.Tests/NCrontab.Tests.csproj
+++ b/NCrontab.Tests/NCrontab.Tests.csproj
@@ -10,6 +10,10 @@
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
diff --git a/appveyor.yml b/appveyor.yml
index 31349e3..d15f0be 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -35,7 +35,10 @@ build_script:
$id = ([datetimeoffset]$env:APPVEYOR_REPO_COMMIT_TIMESTAMP).ToUniversalTime().ToString('yyyyMMdd''t''HHmm')
if ($isWindows) { .\pack.cmd ci-$id }
test_script:
-- cmd: test.cmd
+- cmd: |
+ call test.cmd
+ curl -OsSL https://uploader.codecov.io/latest/windows/codecov.exe
+ codecov
- sh: ./test.sh
for:
-
@@ -44,6 +47,7 @@ for:
- image: Visual Studio 2022
artifacts:
- path: dist\*.nupkg
+ - path: etc\coverage
deploy:
- provider: NuGet
server: https://www.myget.org/F/raboof/api/v2/package
diff --git a/test.cmd b/test.cmd
index 73051c7..32d54ae 100644
--- a/test.cmd
+++ b/test.cmd
@@ -1,17 +1,13 @@
@echo off
pushd "%~dp0"
-call :main %*
-popd
-goto :EOF
-
-:main
- call build ^
- && call :test Debug -p:CollectCoverage=true ^
- -p:CoverletOutputFormat=opencover ^
- -p:Exclude=[NUnit*]* ^
- && call :test Release
-goto :EOF
+dotnet tool restore ^
+ && call build ^
+ && call :test Debug ^
+ && call :test Release ^
+ && dotnet reportgenerator -reports:NCrontab.Tests\TestResults\*\coverage.cobertura.xml -targetdir:etc\coverage -reporttypes:TextSummary;Html ^
+ && type etc\coverage\Summary.txt
+popd && exit /b %ERRORLEVEL%
:test
-dotnet test --no-build -c %1 NCrontab.Tests
+dotnet test --no-build -s NCrontab.Tests\.runsettings -c %*
goto :EOF
diff --git a/test.sh b/test.sh
index 9339436..c5e74f1 100755
--- a/test.sh
+++ b/test.sh
@@ -1,12 +1,15 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"
+dotnet tool restore
./build.sh
-for f in net7.0 net6.0; do {
- dotnet test --no-build NCrontab.Tests -c Debug -f $f \
- -p:CollectCoverage=true \
- -p:CoverletOutputFormat=opencover \
- -p:Exclude=[NUnit*]*
- dotnet test --no-build NCrontab.Tests -c Release -f $f
-}
+for f in net7.0 net6.0; do
+ for c in Debug Release; do
+ dotnet test --no-build -c $c -f $f \
+ -s NCrontab.Tests/.runsettings
+ done
done
+dotnet reportgenerator '-reports:NCrontab.Tests/TestResults/*/coverage.cobertura.xml' \
+ -targetdir:etc/coverage \
+ '-reporttypes:TextSummary;Html'
+cat etc/coverage/Summary.txt