diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cdba683..3d37618 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -4,7 +4,7 @@ on: [push]
jobs:
build:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
env:
VERBOSITY: q
CONFIGURATION: Release
@@ -12,10 +12,10 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-dotnet@v3
+ - uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
with:
- dotnet-version: 7.0.306
+ dotnet-version: 8.0.406
#- name: Info
# run: dotnet --info
- name: Restore
@@ -36,23 +36,22 @@ jobs:
- name: Test Reporter
if: ${{ !env.ACT }}
- uses: dorny/test-reporter@v1.6.0
+ uses: dorny/test-reporter@main
with:
name: Test Report
- path: "./release/TestResults/*.trx"
- reporter: dotnet-trx
+ path: "./release/TestResults/NMoneys.Tests.xml"
+ reporter: dotnet-nunit
fail-on-error: true
- - name: Upload trx
- uses: actions/upload-artifact@v3
+ - name: Upload test results
+ uses: actions/upload-artifact@v4
with:
name: tests-results
path: |
- ./release/TestResults/*.trx
./release/TestResults/*.xml
- name: Upload bin
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: bin
path: |
@@ -61,20 +60,20 @@ jobs:
./release/*.dll
- name: Upload packages
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: packages
path: ./release/*.nupkg
- name: Upload Codecov coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v5
with:
- files: ./release/TestResults/coverage.cobertura.xml
+ files: ./release/TestResults/NMoneys.Tests.cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Upload Coveralls coverage
uses: coverallsapp/github-action@v2
with:
- files: ./release/TestResults/coverage.cobertura.xml
+ files: ./release/TestResults/NMoneys.Tests.cobertura.xml
format: cobertura
diff --git a/scripts/NMoneys.build.ps1 b/scripts/NMoneys.build.ps1
index cc2f28d..b78ce4b 100644
--- a/scripts/NMoneys.build.ps1
+++ b/scripts/NMoneys.build.ps1
@@ -16,6 +16,12 @@ task default -depends Clean, Restore, Compile, Test, Pack, CopyArtifacts
task Clean {
exec { & dotnet clean -c $configuration -v $verbosity --nologo $BASE_DIR }
+ # clear built packages
+ Join-Path $BASE_DIR src NMoneys bin $configuration |
+ Get-ChildItem |
+ Where-Object { $_.Name -match '.nupkg' } |
+ Remove-Item
+ # clear release folder
Remove-Item $RELEASE_DIR -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
}
@@ -31,33 +37,17 @@ task Test {
$test_projects = @('NMoneys.Tests')
foreach ($test_project in $test_projects) {
$tests_dir = Join-Path $BASE_DIR tests $test_project
- $trx = Join-Path TestResults "$test_project.trx"
- $html = Join-Path TestResults "$test_project.html"
+ $test_results_dir = Join-Path $RELEASE_DIR TestResults
+ $runsettings_path = Join-Path $BASE_DIR tests .runsettings
exec {
- & dotnet test --no-build -c $configuration --nologo -v $verbosity $tests_dir `
- --results-directory $RELEASE_DIR `
- --collect:"XPlat Code Coverage" `
- -l:"console;verbosity=minimal;NoSummary=true" `
- -l:"trx;LogFileName=$trx" `
- -l:"html;LogFileName=$html" `
- -- NUnit.TestOutputXml=TestResults NUnit.OutputXmlFolderMode=RelativeToResultDirectory
+ & dotnet run --no-build -c $configuration -v $verbosity --project $tests_dir -- `
+ --results-directory $test_results_dir `
+ --coverage --coverage-output-format cobertura --coverage-output "$test_project.cobertura.xml" `
+ --settings $runsettings_path
}
}
- $test_results_dir = Join-Path $RELEASE_DIR TestResults
- # copy coverage file to $RELEASE_DIR/TestResults
- $RELEASE_DIR |
- Get-ChildItem -exclude TestResults |
- Get-ChildItem -Recurse |
- Where-Object { $_.Name -match 'coverage.cobertura.xml' } |
- Copy-Item -Destination $test_results_dir
-
- # clean coverage directories
- $RELEASE_DIR |
- Get-ChildItem -Directory -Exclude 'TestResults' |
- Remove-Item -Recurse
-
# TODO: generate extra HTML reports
}
diff --git a/src/NMoneys/CurrencyIsoCode.cs b/src/NMoneys/CurrencyIsoCode.cs
index 3b40be3..25e0133 100644
--- a/src/NMoneys/CurrencyIsoCode.cs
+++ b/src/NMoneys/CurrencyIsoCode.cs
@@ -523,14 +523,15 @@ public enum CurrencyIsoCode : ushort
///
/// Peso Convertible
///
- [CanonicalCulture("es-CU", Overwritten = true)]
+ [CanonicalCulture("es-CU", Overwritten = true), Obsolete("withdrawn of circulation")]
[Info(
englishName: "Peso Convertible", nativeName: "peso cubano convertible", symbol: "CUC$",
significantDecimalDigits: 2,
decimalSeparator: ".",
groupSeparator: ",", groupSizes: new byte[] { 3 },
positivePattern: 0, negativePattern: 1,
- codePoint: 36, entityName: "dollar"
+ codePoint: 36, entityName: "dollar",
+ isObsolete: true
)]
CUC = 931,
diff --git a/src/NMoneys/NMoneys.csproj b/src/NMoneys/NMoneys.csproj
index 682a688..03453a4 100644
--- a/src/NMoneys/NMoneys.csproj
+++ b/src/NMoneys/NMoneys.csproj
@@ -31,10 +31,10 @@
- 7.3.0
- 7.3.0.0
- 7.3.0.0
- 7.3.0
+ 7.4.0
+ 7.4.0.0
+ 7.4.0.0
+ 7.4.0
diff --git a/tests/.runsettings b/tests/.runsettings
new file mode 100644
index 0000000..e98d476
--- /dev/null
+++ b/tests/.runsettings
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ -1
+ -1
+ true
+ false
+ TestOutputXml
+ UseResultDirectory
+
+
diff --git a/tests/NMoneys.Serialization.Tests/NMoneys.Serialization.Tests.csproj b/tests/NMoneys.Serialization.Tests/NMoneys.Serialization.Tests.csproj
index 8ca225d..ea764f8 100644
--- a/tests/NMoneys.Serialization.Tests/NMoneys.Serialization.Tests.csproj
+++ b/tests/NMoneys.Serialization.Tests/NMoneys.Serialization.Tests.csproj
@@ -6,20 +6,28 @@
enable
false
- true
+ true
+ Exe
+ true
+
+ false
+ false
-
+
-
-
-
-
-
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
@@ -28,6 +36,4 @@
-
-
diff --git a/tests/NMoneys.Tests/NMoneys.Tests.csproj b/tests/NMoneys.Tests/NMoneys.Tests.csproj
index f5ccdd1..888ddcf 100644
--- a/tests/NMoneys.Tests/NMoneys.Tests.csproj
+++ b/tests/NMoneys.Tests/NMoneys.Tests.csproj
@@ -6,23 +6,26 @@
enable
false
- true
+
+ true
+ Exe
+ true
+
+ false
+ false
-
-
-
-
-
+
+
+
+
+
-
-
-