Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ env:

on:
push:
pull_request:
paths-ignore:
- '*.md'

jobs:
build:
if: |
github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
github.event_name == 'push'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
path: "TestResult/**/*"

deployRelease:
if: github.event_name == 'push' && github.ref == 'refs/heads/release'
if: github.ref == 'refs/heads/release'
runs-on: ubuntu-latest
needs: build
steps:
Expand All @@ -68,7 +68,7 @@ jobs:
gh release create ${{env.CURRENT_VERSION}} *.*nupkg --generate-notes

deployTest:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
steps:
Expand Down
2 changes: 1 addition & 1 deletion OpenXmlPowerTools.Tests/ChartUpdaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.IO;
using Xunit;

namespace Codeuctivity.Tests
namespace OpenXmlPowerTools.Tests
{
public class CuTests
{
Expand Down
4 changes: 2 additions & 2 deletions OpenXmlPowerTools.Tests/ColorParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using SkiaSharp;
using Xunit;

namespace Codeuctivity.Tests
namespace OpenXmlPowerTools.Tests
{
public class ColorParserTests
{
Expand Down Expand Up @@ -53,4 +53,4 @@ public void ShouldRejectInvalidColors(string? input)
Assert.False(success);
}
}
}
}
2 changes: 1 addition & 1 deletion OpenXmlPowerTools.Tests/CssPropertyValueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using SkiaSharp;
using Xunit;

namespace Codeuctivity.Tests
namespace OpenXmlPowerTools.Tests
{
public class CssPropertyValueTests
{
Expand Down
18 changes: 9 additions & 9 deletions OpenXmlPowerTools.Tests/DocumentAssemblerTests.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using Codeuctivity.OpenXmlPowerTools;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using DocumentFormat.OpenXml.Validation;
using DocumentFormat.OpenXml.Wordprocessing;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using Xunit;
using System.Globalization;

namespace Codeuctivity.Tests
namespace OpenXmlPowerTools.Tests
{
public class DaTests
{
Expand Down Expand Up @@ -126,7 +126,7 @@ public void DA101(string name, string data, bool err)
ms.Write(afterAssembling.DocumentByteArray, 0, afterAssembling.DocumentByteArray.Length);
using var wDoc = WordprocessingDocument.Open(ms, true);
var v = new OpenXmlValidator();
var valErrors = v.Validate(wDoc).Where(ve => !s_ExpectedErrors.Contains(ve.Description));
var valErrors = v.Validate(wDoc, TestContext.Current.CancellationToken).Where(ve => !s_ExpectedErrors.Contains(ve.Description));

var sb = new StringBuilder();
foreach (var item in valErrors.Select(r => r.Description).OrderBy(t => t).Distinct())
Expand Down Expand Up @@ -215,7 +215,7 @@ public void DA103_UseXmlDocument(string name, string data, bool err)
ms.Write(afterAssembling.DocumentByteArray, 0, afterAssembling.DocumentByteArray.Length);
using var wDoc = WordprocessingDocument.Open(ms, true);
var v = new OpenXmlValidator();
var valErrors = v.Validate(wDoc).Where(ve => !s_ExpectedErrors.Contains(ve.Description));
var valErrors = v.Validate(wDoc, TestContext.Current.CancellationToken).Where(ve => !s_ExpectedErrors.Contains(ve.Description));
Assert.Empty(valErrors);
}

Expand Down Expand Up @@ -515,8 +515,8 @@ private static string InnerText(XContainer e)
.StringConcatenate();
}

private static readonly List<string> s_ExpectedErrors = new List<string>()
{
private static readonly List<string> s_ExpectedErrors =
[
"The 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:evenHBand' attribute is not declared.",
"The 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:evenVBand' attribute is not declared.",
"The 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:firstColumn' attribute is not declared.",
Expand All @@ -531,6 +531,6 @@ private static string InnerText(XContainer e)
"The 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:noVBand' attribute is not declared.",
"The 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:oddHBand' attribute is not declared.",
"The 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:oddVBand' attribute is not declared.",
};
];
}
}
}
Loading
Loading