Skip to content

Commit

Permalink
More debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-martinsmith committed Aug 21, 2024
1 parent 7ebb26b commit 197f60e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ jobs:
- name: Test
run: dotnet test --no-restore --no-build --configuration ${{ env.BUILD_CONFIG }} --verbosity normal --logger:trx;LogFileName=TestOutput.trx --collect:"XPlat Code Coverage"

- name: Test Results Summary
uses: bibipkins/[email protected]
if: success() || failure()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: 'Unit Test Results'
results-path: "**/*.trx"
coverage-type: cobertura
#coverage-path: "**/coverage.cobertura.xml"
#coverage-threshold: ${{ env.COVERAGE_WARNING_THRESHOLD }}

- name: Code Coverage Report
uses: irongut/[email protected]
if: success() || failure()
Expand All @@ -132,17 +143,6 @@ jobs:
output: both
thresholds: '${{ env.COVERAGE_ERROR_THRESHOLD }} ${{ env.COVERAGE_WARNING_THRESHOLD }}'

- name: Test Results Summary
uses: bibipkins/[email protected]
if: success() || failure()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: 'Unit Test Results'
results-path: "**/*.trx"
coverage-type: cobertura
#coverage-path: "**/coverage.cobertura.xml"
#coverage-threshold: ${{ env.COVERAGE_WARNING_THRESHOLD }}

- name: Pull Request - Add Coverage Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DNX.Extensions.IO;
using DNX.Extensions.Linq;
using DNX.Extensions.Strings;
using FluentAssertions;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -226,7 +226,7 @@ public void FindDirectories_for_multiple_patterns_with_recursion_finds_expected_
[MemberData(nameof(GetRelativePath_Data))]
public void GetRelativePath_can_extract_relative_path_correctly(string dirName, string relativeToDirName, string expected)
{
_outputHelper.WriteLine($"{Environment.OSVersion.Platform} - Checking DirName: {dirName} -> {relativeToDirName}");
_outputHelper.WriteLine($"{Environment.OSVersion.Platform} - Checking DirName: {dirName} -> {relativeToDirName} = {expected}");

var dirInfo = dirName == null ? null : new DirectoryInfo(dirName);
var relativeToDirInfo = relativeToDirName == null ? null : new DirectoryInfo(relativeToDirName);
Expand Down Expand Up @@ -258,9 +258,9 @@ public static TheoryData<string, string, string> GetRelativePath_Data()
{
data.Add(Path.Combine(Path.GetTempPath(), "folder1"), Path.Combine("D:", "folder2"), Path.Combine(Path.GetTempPath(), "folder1"));
}
else if (Configuration.EnvironmentConfig.IsLinuxStyleFileSystem)
if (Configuration.EnvironmentConfig.IsLinuxStyleFileSystem)
{
data.Add(Path.Combine(Path.GetTempPath(), "folder1"), Path.Combine("/etc", "folder2"), Path.Combine("..", "..", Path.GetTempPath(), "folder1"));
data.Add(Path.Combine(Path.GetTempPath(), "folder1"), Path.Combine("/etc", "folder2"), Path.Combine(Path.GetTempPath(), "folder1").EnsureStartsWith(Path.Combine("..", "..")));
}

return data;
Expand Down
5 changes: 2 additions & 3 deletions tests/DNX.Extensions.Tests/IO/FileInfoExtensionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using DNX.Extensions.IO;
using DNX.Extensions.Linq;
using FluentAssertions;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -32,7 +31,7 @@ private static string DriveRoot2
[MemberData(nameof(GetRelativeFileName_Data))]
public void GetRelativeFileName_can_extract_relative_filename_correctly(string fileName, string dirName, string expected)
{
outputHelper.WriteLine($"{Environment.OSVersion.Platform} - Checking FileName: {fileName} -> {dirName}");
outputHelper.WriteLine($"{Environment.OSVersion.Platform} - Checking FileName: {fileName} -> {dirName} = {expected}");

var fileInfo = new FileInfo(fileName);
var dirInfo = new DirectoryInfo(dirName);
Expand All @@ -46,7 +45,7 @@ public void GetRelativeFileName_can_extract_relative_filename_correctly(string f
[MemberData(nameof(GetRelativeFilePath_Data))]
public void GetRelativeFilePath_can_extract_relative_path_correctly(string fileName, string dirName, string expected)
{
outputHelper.WriteLine($"{Environment.OSVersion.Platform} - Checking FileName: {fileName} -> {dirName}");
outputHelper.WriteLine($"{Environment.OSVersion.Platform} - Checking FileName: {fileName} -> {dirName} = {expected}");

var fileInfo = new FileInfo(fileName);
var dirInfo = new DirectoryInfo(dirName);
Expand Down

0 comments on commit 197f60e

Please sign in to comment.