Merge pull request #127 from Biarity/fix-pipeline

Trigger GitAction on pull requests
This commit is contained in:
ITDancer13 2021-05-14 13:46:45 +02:00 committed by GitHub
commit 108f20f956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 15 deletions

View File

@ -20,6 +20,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ubuntu-latest:

View File

@ -15,29 +15,23 @@ using static Nuke.Common.Tools.DotNet.DotNetTasks;
[ShutdownDotNetAfterServerBuild]
[GitHubActions("ci", GitHubActionsImage.UbuntuLatest,
OnPushBranches = new[] {"master"},
OnPullRequestBranches = new[] {"master"},
AutoGenerate = true,
InvokedTargets = new[] {nameof(Ci)},
CacheKeyFiles = new string[0])]
class Build : NukeBuild
{
/// Support plugins are available for:
/// - JetBrains ReSharper https://nuke.build/resharper
/// - JetBrains Rider https://nuke.build/rider
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Package);
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
[Solution] readonly Solution Solution;
Project SieveProject => Solution.AllProjects.First(p => p.Name == "Sieve");
[GitRepository] readonly GitRepository GitRepository;
[GitVersion(Framework = "netcoreapp3.1")] readonly GitVersion GitVersion;
[Solution] readonly Solution Solution;
Project SieveProject => Solution.AllProjects.First(p => p.Name == "Sieve");
AbsolutePath OutputDirectory => RootDirectory / "output";
Target Clean => _ => _
@ -73,9 +67,7 @@ class Build : NukeBuild
.Executes(() =>
{
DotNetTest(s => s
.SetProjectFile(Solution)
.EnableNoRestore()
.EnableNoBuild());
.SetProjectFile(Solution));
});
Target Package => _ => _
@ -93,4 +85,11 @@ class Build : NukeBuild
Target Ci => _ => _
.DependsOn(Package);
/// Support plugins are available for:
/// - JetBrains ReSharper https://nuke.build/resharper
/// - JetBrains Rider https://nuke.build/rider
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Package);
}