Skip to content

Commit 64785bf

Browse files
committed
Add Linux-specific condition for publishing artifacts in GitHub Actions workflow and update code coverage settings configuration
1 parent 8090a8e commit 64785bf

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/pull-request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
- name: 'Publish: coverage_report'
4444
uses: actions/upload-artifact@v4
45+
if: runner.os == 'Linux'
4546
with:
4647
name: coverage_report
4748
path: .tests/coverage_report
@@ -65,6 +66,7 @@ jobs:
6566
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6667
- name: 'Publish: coverage_report'
6768
uses: actions/upload-artifact@v4
69+
if: runner.os == 'Linux'
6870
with:
6971
name: coverage_report
7072
path: .tests/coverage_report

build/Build.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
InvokedTargets = [NukeTargets.Rebuild, NukeTargets.CodeCoverage, NukeTargets.Pack],
3131
EnableGitHubToken = true,
3232
PublishArtifacts = true,
33+
PublishCondition = "runner.os == 'Linux'",
3334
FetchDepth = 0
3435
)]
3536
[GitHubActions("main", GitHubActionsImage.UbuntuLatest,

source/NukeBuild/CreativeCoders.NukeBuild.Components/Targets/Settings/ICodeCoverageSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using CreativeCoders.Core;
22
using CreativeCoders.Core.IO;
33
using CreativeCoders.Core.SysEnvironment;
4+
using Nuke.Common.CI.GitHubActions;
45
using Nuke.Common.IO;
56

67
namespace CreativeCoders.NukeBuild.Components.Targets.Settings;
@@ -16,5 +17,5 @@ public interface ICodeCoverageSettings : ITestSettings
1617

1718
string Framework => $"net{Env.Version.Major}.0";
1819

19-
IEnumerable<string> Reports => new string[] { TestBaseDirectory / "coverage" / "**" / "*.xml" };
20+
IEnumerable<string> Reports => [TestBaseDirectory / "coverage" / "**" / "*.xml"];
2021
}

0 commit comments

Comments
 (0)