Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/npoi 2.7.1 #1

Merged
merged 6 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore Npoi.Mapper/Npoi.Mapper.sln
- name: Build
run: dotnet build --no-restore Npoi.Mapper/Npoi.Mapper.sln
- name: Test
run: dotnet test --framework net6.0 --no-build --verbosity normal Npoi.Mapper/Npoi.Mapper.sln
run: dotnet test --framework net8.0 --no-build --verbosity normal Npoi.Mapper/Npoi.Mapper.sln
6 changes: 3 additions & 3 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore Npoi.Mapper/Npoi.Mapper.sln
- name: Build
run: dotnet build --no-restore Npoi.Mapper/Npoi.Mapper.sln
- name: Test
run: dotnet test --framework net6.0 --no-build --verbosity normal Npoi.Mapper/Npoi.Mapper.sln
run: dotnet test --framework net8.0 --no-build --verbosity normal Npoi.Mapper/Npoi.Mapper.sln

# Publish
- name: publish on version change
Expand All @@ -35,7 +35,7 @@ jobs:
# BUILD_PLATFORM: x64

# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: Npoi.Mapper
PACKAGE_NAME: Npoi.Mapper.Updated

# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props
Expand Down
6 changes: 3 additions & 3 deletions Npoi.Mapper/src/Npoi.Mapper/Npoi.Mapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<PackageProjectUrl>https://donnytian.github.io/Npoi.Mapper/</PackageProjectUrl>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>6.2.1</Version>
<PackageReleaseNotes>Support net472 and net6.0</PackageReleaseNotes>
<PackageReleaseNotes>Support net472, net6.0 and net8.0</PackageReleaseNotes>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>npoi.mapper.snk</AssemblyOriginatorKeyFile>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<LangVersion>default</LangVersion>
</PropertyGroup>

Expand All @@ -31,7 +31,7 @@

<ItemGroup>
<PackageReference Include="LogicExtensions" Version="0.0.3" />
<PackageReference Include="NPOI" Version="2.6.2" />
<PackageReference Include="NPOI" Version="2.7.1" />
</ItemGroup>

<ItemGroup Label="SourceLink">
Expand Down
6 changes: 3 additions & 3 deletions Npoi.Mapper/test/ExportGeneralTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public void MergeToExistedRowsTest()
// Assert
var sheet = exporter.Workbook.GetSheet(sheetName);
Assert.AreEqual(sampleObj.GeneralProperty, sheet.GetRow(4).GetCell(1).StringCellValue);
Assert.AreEqual(sampleObj.DateProperty.Date, sheet.GetRow(4).GetCell(2).DateCellValue.Date);
Assert.AreEqual(sampleObj.DateProperty.Date, sheet.GetRow(4).GetCell(2).DateCellValue?.Date);
File.Delete(existingFile);
}

Expand All @@ -300,7 +300,7 @@ public void PutAppendRowTest()
// Assert
var sheet = workbook.GetSheet(sheetName);
Assert.AreEqual(sampleObj.GeneralProperty, sheet.GetRow(4).GetCell(1).StringCellValue);
Assert.AreEqual(sampleObj.DateProperty.Date, sheet.GetRow(4).GetCell(2).DateCellValue.Date);
Assert.AreEqual(sampleObj.DateProperty.Date, sheet.GetRow(4).GetCell(2).DateCellValue?.Date);
File.Delete(existingFile);
}

Expand Down Expand Up @@ -328,7 +328,7 @@ public void PutOverwriteRowTest()
var row = sheet.GetRow(1);
Assert.AreEqual(1, sheet.LastRowNum);
Assert.AreEqual(sampleObj.GeneralProperty, row.GetCell(1).StringCellValue);
Assert.AreEqual(sampleObj.DateProperty.Date, row.GetCell(2).DateCellValue.Date);
Assert.AreEqual(sampleObj.DateProperty.Date, row.GetCell(2).DateCellValue?.Date);
}

[Test]
Expand Down
Loading