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
25 changes: 25 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: LibraryManagement Build Pipline
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Build:
runs-on: windows-2022
steps:
- name: Checking Out Code
uses: actions/checkout@v2
- name: Seting Up .Net
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.412
include-prerelease: false
- name: Restoring Nuget Packages
run: dotnet restore
- name: Building Project
run: dotnet build --no-restore
- name: Running Tests
run: dotnet test --no-build --verbosity normal
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ADotNet" Version="4.1.0" />
</ItemGroup>

</Project>
77 changes: 77 additions & 0 deletions LibraryManagement.Api.Infrastructure.Build/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//-----------------------------------------------------------
// Copyright (c) Coalition of Good-Hearted Engineers
// Free To Use To Build Reliable Library Management Solutions
//-----------------------------------------------------------

using ADotNet.Clients;
using ADotNet.Models.Pipelines.GithubPipelines.DotNets;
using ADotNet.Models.Pipelines.GithubPipelines.DotNets.Tasks;
using ADotNet.Models.Pipelines.GithubPipelines.DotNets.Tasks.SetupDotNetTaskV1s;

var githubPipeline = new GithubPipeline
{
Name = "LibraryManagement Build Pipline",

OnEvents = new Events
{
PullRequest = new PullRequestEvent
{
Branches = new string[] { "master" }
},

Push = new PushEvent
{
Branches = new string[] { "master" }
}
},

Jobs = new Dictionary<string, Job>
{
{
"Build",
new Job
{
RunsOn = BuildMachines.Windows2022,

Steps = new List<GithubTask>
{
new CheckoutTaskV2
{
Name = "Checking Out Code"
},

new SetupDotNetTaskV1
{
Name = "Seting Up .Net",

TargetDotNetVersion = new TargetDotNetVersion
{
DotNetVersion = "8.0.412",
}
},

new RestoreTask
{
Name = "Restoring Nuget Packages"
},

new DotNetBuildTask
{
Name = "Building Project"
},

new TestTask
{
Name = "Running Tests"
}
}
}
}
}
};

var client = new ADotNetClient();

client.SerializeAndWriteToFile(
adoPipeline: githubPipeline,
path: "../../../../.github/workflows/dotnet.yml");
6 changes: 6 additions & 0 deletions LibraryManagement.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement.Api", "Li
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement.Api.Tests.Unit", "LibraryManagement.Api.Tests.Unit\LibraryManagement.Api.Tests.Unit.csproj", "{AF000EF4-2C94-4C07-B34B-A08A03D4853C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement.Api.Infrastructure.Build", "LibraryManagement.Api.Infrastructure.Build\LibraryManagement.Api.Infrastructure.Build.csproj", "{3735E352-3056-4273-9D31-C8C689E08377}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{AF000EF4-2C94-4C07-B34B-A08A03D4853C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF000EF4-2C94-4C07-B34B-A08A03D4853C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF000EF4-2C94-4C07-B34B-A08A03D4853C}.Release|Any CPU.Build.0 = Release|Any CPU
{3735E352-3056-4273-9D31-C8C689E08377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3735E352-3056-4273-9D31-C8C689E08377}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3735E352-3056-4273-9D31-C8C689E08377}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3735E352-3056-4273-9D31-C8C689E08377}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down