Skip to content

Commit

Permalink
Updated the workflow tempalte to use SonarCloud and added more libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Farshad DASHTI authored and Farshad DASHTI committed Oct 4, 2024
1 parent c609926 commit ed87306
Show file tree
Hide file tree
Showing 53 changed files with 1,636 additions and 54 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-test-asyncprocessing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build DfE.CoreLibs.AsyncProcessing

on:
push:
branches:
- main
paths:
- 'src/DfE.CoreLibs.AsyncProcessing/**'

jobs:
build-and-test:
uses: ./.github/workflows/build-test-template.yml
with:
project_name: DfE.CoreLibs.AsyncProcessing
project_path: src/DfE.CoreLibs.AsyncProcessing
sonar_project_key: DFE-Digital_corelibs-asyncprocessing
16 changes: 0 additions & 16 deletions .github/workflows/build-test-backgroundservice.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/build-test-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build DfE.CoreLibs.Contracts

on:
push:
branches:
- main
paths:
- 'src/DfE.CoreLibs.Contracts/**'

jobs:
build-and-test:
uses: ./.github/workflows/build-test-template.yml
with:
project_name: DfE.CoreLibs.Contracts
project_path: src/DfE.CoreLibs.Contracts
sonar_project_key: DFE-Digital_corelibs-contracts
16 changes: 16 additions & 0 deletions .github/workflows/build-test-http.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build DfE.CoreLibs.Http

on:
push:
branches:
- main
paths:
- 'src/DfE.CoreLibs.Http/**'

jobs:
build-and-test:
uses: ./.github/workflows/build-test-template.yml
with:
project_name: DfE.CoreLibs.Http
project_path: src/DfE.CoreLibs.Http
sonar_project_key: DFE-Digital_corelibs-http
16 changes: 16 additions & 0 deletions .github/workflows/build-test-utilities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build DfE.CoreLibs.Utilities

on:
push:
branches:
- main
paths:
- 'src/DfE.CoreLibs.Utilities/**'

jobs:
build-and-test:
uses: ./.github/workflows/build-test-template.yml
with:
project_name: DfE.CoreLibs.Utilities
project_path: src/DfE.CoreLibs.Utilities
sonar_project_key: DFE-Digital_corelibs-utilities
15 changes: 15 additions & 0 deletions .github/workflows/pack-asyncprocessing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pack DfE.CoreLibs.AsyncProcessing

on:
workflow_run:
workflows: ["Build DfE.CoreLibs.AsyncProcessing"]
types:
- completed

jobs:
build-and-package:
uses: ./.github/workflows/nuget-package-template.yml
with:
project_name: DfE.CoreLibs.AsyncProcessing
project_path: src/DfE.CoreLibs.AsyncProcessing
nuget_package_name: DfE.CoreLibs.AsyncProcessing
15 changes: 0 additions & 15 deletions .github/workflows/pack-backgroundservice.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/pack-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pack DfE.CoreLibs.Contracts

on:
workflow_run:
workflows: ["Build DfE.CoreLibs.Contracts"]
types:
- completed

jobs:
build-and-package:
uses: ./.github/workflows/nuget-package-template.yml
with:
project_name: DfE.CoreLibs.Contracts
project_path: src/DfE.CoreLibs.Contracts
nuget_package_name: DfE.CoreLibs.Contracts
15 changes: 15 additions & 0 deletions .github/workflows/pack-http.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pack DfE.CoreLibs.Http

on:
workflow_run:
workflows: ["Build DfE.CoreLibs.Http"]
types:
- completed

jobs:
build-and-package:
uses: ./.github/workflows/nuget-package-template.yml
with:
project_name: DfE.CoreLibs.Http
project_path: src/DfE.CoreLibs.Http
nuget_package_name: DfE.CoreLibs.Http
15 changes: 15 additions & 0 deletions .github/workflows/pack-utilities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pack DfE.CoreLibs.Utilities

on:
workflow_run:
workflows: ["Build DfE.CoreLibs.Utilities"]
types:
- completed

jobs:
build-and-package:
uses: ./.github/workflows/nuget-package-template.yml
with:
project_name: DfE.CoreLibs.Utilities
project_path: src/DfE.CoreLibs.Utilities
nuget_package_name: DfE.CoreLibs.Utilities
41 changes: 35 additions & 6 deletions DfE.CoreLibs.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ VisualStudioVersion = 17.10.35122.118
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DfE.CoreLibs.Caching", "src\DfE.CoreLibs.Caching\DfE.CoreLibs.Caching.csproj", "{D88D58F0-18C4-4C3B-805B-8A483500E73E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DfE.CoreLibs.BackgroundService", "src\DfE.CoreLibs.BackgroundService\DfE.CoreLibs.BackgroundService.csproj", "{C7194A27-7254-49A3-8D0E-9B67708D3D43}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DfE.CoreLibs.Testing", "src\DfE.CoreLibs.Testing\DfE.CoreLibs.Testing.csproj", "{59BCCF06-99DC-4436-BFC2-074B23F71B6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DfE.CoreLibs.Testing", "src\DfE.CoreLibs.Testing\DfE.CoreLibs.Testing.csproj", "{59BCCF06-99DC-4436-BFC2-074B23F71B6A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DfE.CoreLibs.Contracts", "src\DfE.CoreLibs.Contracts\DfE.CoreLibs.Contracts.csproj", "{2542FB63-B097-4686-B172-27666445E54E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DfE.CoreLibs.Http", "src\DfE.CoreLibs.Http\DfE.CoreLibs.Http.csproj", "{41478208-EA44-42EA-8CE1-2F5F8B6020A0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DfE.CoreLibs.Utilities", "src\DfE.CoreLibs.Utilities\DfE.CoreLibs.Utilities.csproj", "{653F54A6-602B-4234-B8A2-E79C4159814A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DfE.CoreLibs.AsyncProcessing", "src\DfE.CoreLibs.AsyncProcessing\DfE.CoreLibs.AsyncProcessing.csproj", "{0C06E8B9-E67C-4611-9FBE-894327EDF011}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3F89DCAD-8EC7-41ED-A08F-A9EFAE263EB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DfE.CoreLibs.Utilities.Tests", "src\Tests\DfE.CoreLibs.Utilities.Tests\DfE.CoreLibs.Utilities.Tests.csproj", "{07AE8F19-9566-4F0C-92E6-0A2BF122DCC9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -19,18 +29,37 @@ Global
{D88D58F0-18C4-4C3B-805B-8A483500E73E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D88D58F0-18C4-4C3B-805B-8A483500E73E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D88D58F0-18C4-4C3B-805B-8A483500E73E}.Release|Any CPU.Build.0 = Release|Any CPU
{C7194A27-7254-49A3-8D0E-9B67708D3D43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7194A27-7254-49A3-8D0E-9B67708D3D43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7194A27-7254-49A3-8D0E-9B67708D3D43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7194A27-7254-49A3-8D0E-9B67708D3D43}.Release|Any CPU.Build.0 = Release|Any CPU
{59BCCF06-99DC-4436-BFC2-074B23F71B6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59BCCF06-99DC-4436-BFC2-074B23F71B6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59BCCF06-99DC-4436-BFC2-074B23F71B6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59BCCF06-99DC-4436-BFC2-074B23F71B6A}.Release|Any CPU.Build.0 = Release|Any CPU
{2542FB63-B097-4686-B172-27666445E54E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2542FB63-B097-4686-B172-27666445E54E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2542FB63-B097-4686-B172-27666445E54E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2542FB63-B097-4686-B172-27666445E54E}.Release|Any CPU.Build.0 = Release|Any CPU
{41478208-EA44-42EA-8CE1-2F5F8B6020A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41478208-EA44-42EA-8CE1-2F5F8B6020A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41478208-EA44-42EA-8CE1-2F5F8B6020A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41478208-EA44-42EA-8CE1-2F5F8B6020A0}.Release|Any CPU.Build.0 = Release|Any CPU
{653F54A6-602B-4234-B8A2-E79C4159814A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{653F54A6-602B-4234-B8A2-E79C4159814A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{653F54A6-602B-4234-B8A2-E79C4159814A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{653F54A6-602B-4234-B8A2-E79C4159814A}.Release|Any CPU.Build.0 = Release|Any CPU
{0C06E8B9-E67C-4611-9FBE-894327EDF011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C06E8B9-E67C-4611-9FBE-894327EDF011}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C06E8B9-E67C-4611-9FBE-894327EDF011}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C06E8B9-E67C-4611-9FBE-894327EDF011}.Release|Any CPU.Build.0 = Release|Any CPU
{07AE8F19-9566-4F0C-92E6-0A2BF122DCC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07AE8F19-9566-4F0C-92E6-0A2BF122DCC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07AE8F19-9566-4F0C-92E6-0A2BF122DCC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07AE8F19-9566-4F0C-92E6-0A2BF122DCC9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{07AE8F19-9566-4F0C-92E6-0A2BF122DCC9} = {3F89DCAD-8EC7-41ED-A08F-A9EFAE263EB4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01D11FBC-6C66-43E4-8F1F-46B105EDD95C}
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<Title>DfE.CoreLibs.BackgroundService</Title>
<Description>This package provides a robust framework for implementing long-running background tasks in .NET applications. It simplifies the development of background services by offering reusable components that streamline task scheduling, execution, and error handling. Ideal for any project requiring background processing, it ensures reliability and scalability across different environments.</Description>
<Title>DfE.CoreLibs.AsyncProcessing</Title>
<Description>A library for managing asynchronous background processing, including task scheduling, service creation, and execution.</Description>
<Authors>DFE-Digital</Authors>
</PropertyGroup>

<Target Name="CheckReadmeExists" BeforeTargets="Pack">
<Message Text="Checking if $(MSBuildThisFileDirectory)readme.md exists..." Importance="high" />
<Error Text="The readme.md file is missing in $(MSBuildThisFileDirectory)" Condition="!Exists('$(MSBuildThisFileDirectory)readme.md')" />
</Target>

<ItemGroup>
<None Include="readme.md" Pack="true" PackagePath="\" />
</ItemGroup>
Expand All @@ -33,6 +28,4 @@
</None>
</ItemGroup>



</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using MediatR;

namespace DfE.CoreLibs.BackgroundService.Interfaces
namespace DfE.CoreLibs.AsyncProcessing.Interfaces
{
public interface IBackgroundServiceEvent : INotification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using MediatR;

namespace DfE.CoreLibs.BackgroundService.Interfaces
namespace DfE.CoreLibs.AsyncProcessing.Interfaces
{
public interface IBackgroundServiceEventHandler<in TEvent> : INotificationHandler<TEvent> where TEvent : IBackgroundServiceEvent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace DfE.CoreLibs.BackgroundService.Interfaces
namespace DfE.CoreLibs.AsyncProcessing.Interfaces
{
public interface IBackgroundServiceFactory
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DfE.CoreLibs.BackgroundService.Interfaces;
using DfE.CoreLibs.BackgroundService.Services;
using DfE.CoreLibs.AsyncProcessing.Interfaces;
using DfE.CoreLibs.AsyncProcessing.Services;

namespace Microsoft.Extensions.DependencyInjection
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Concurrent;
using DfE.CoreLibs.BackgroundService.Interfaces;
using DfE.CoreLibs.AsyncProcessing.Interfaces;
using MediatR;

namespace DfE.CoreLibs.BackgroundService.Services
namespace DfE.CoreLibs.AsyncProcessing.Services
{
public class BackgroundServiceFactory(IMediator mediator) : Microsoft.Extensions.Hosting.BackgroundService, IBackgroundServiceFactory
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/DfE.CoreLibs.Caching/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public static IServiceCollection AddServiceCaching(
return services;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace DfE.CoreLibs.Contracts.Academies.V1.EducationalPerformance
{
/// <summary>
/// Absence Data Response
/// </summary>
public class SchoolAbsenceDataDto
{
/// <summary>
/// Acdemic Year
/// </summary>
public string Year { get; set; }

/// <summary>
///Percentage of possible mornings or afternoons recorded as an absence from school for whatever reason,
///whether authorised or unauthorised, across the full academic year.
/// </summary>
public string? OverallAbsence { get; set; }

/// <summary>
///The percentage of pupils missing 10% or more of the mornings or afternoons they could attend,
///meaning that if a pupil’s overall rate of absence is 10% or higher across the full academic
///year they will be classified as persistently absent.
/// </summary>
public string? PersistentAbsence { get; set; }
}
}
17 changes: 17 additions & 0 deletions src/DfE.CoreLibs.Contracts/Academies/V4/AddressDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace DfE.CoreLibs.Contracts.Academies.V4;

[Serializable]
public class AddressDto
{
public string Street { get; set; }

public string Town { get; set; }

public string County { get; set; }

public string Postcode { get; set; }

public string Locality { get; set; }

public string Additional { get; set; }
}
Loading

0 comments on commit ed87306

Please sign in to comment.