mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-24 14:33:01 +01:00
* Execute pipeline on pull requests
* Restore and build before running the tests
This commit is contained in:
parent
d513b108ba
commit
bbfdb47de2
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -20,6 +20,9 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
ubuntu-latest:
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user