Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from DFE-Digital/feature/academies-api-contracts
Browse files Browse the repository at this point in the history
Feature/academies api contracts
  • Loading branch information
paullocknimble authored Oct 18, 2023
2 parents 13d2e5b + 8ab7634 commit b15585e
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/academiesContracts-CI-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Pull request checks

on:
push:
branches: [ main ]
paths:
- 'academiesContracts/**'
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]
paths:
- 'academiesContracts/**'

defaults:
run:
working-directory: academiesContracts
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build
62 changes: 62 additions & 0 deletions .github/workflows/academiesContracts-build-and-push-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Package academiesContracts

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'academiesContracts/**'
# release:
# types: [published]

defaults:
run:
working-directory: academiesContracts

env:
DOCKER_IMAGE: amsd-app
NODE_VERSION: 16.x

jobs:
set-env:
name: Determine environment
runs-on: ubuntu-22.04
outputs:
environment: ${{ steps.var.outputs.environment }}
branch: ${{ steps.var.outputs.branch }}
release: ${{ steps.var.outputs.release }}
checked-out-sha: ${{ steps.var.outputs.checked-out-sha }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}

- id: var
run: |
GIT_REF=${{ github.ref }}
GIT_BRANCH=${GIT_REF##*/}
INPUT=${{ github.event.inputs.environment }}
ENVIRONMENT=${INPUT:-"dev"}
RELEASE=${ENVIRONMENT,,}-`date +%Y-%m-%d`.${{ github.run_number }}
CHECKED_OUT_SHA="$(git log -1 '--format=format:%H')"
echo "environment=${ENVIRONMENT,,}" >> $GITHUB_OUTPUT
echo "branch=$GIT_BRANCH" >> $GITHUB_OUTPUT
echo "release=${RELEASE}" >> $GITHUB_OUTPUT
echo "checked-out-sha=${CHECKED_OUT_SHA}" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build
- name: Pack nugets
run: dotnet pack -c Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/DFE-Digital/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dfe.Academies.Contracts", "Dfe.Academies.Contracts\Dfe.Academies.Contracts.csproj", "{7F11AE18-0C58-49DF-99EB-1A2A0FD1B89D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7F11AE18-0C58-49DF-99EB-1A2A0FD1B89D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F11AE18-0C58-49DF-99EB-1A2A0FD1B89D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F11AE18-0C58-49DF-99EB-1A2A0FD1B89D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F11AE18-0C58-49DF-99EB-1A2A0FD1B89D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4020CE5F-E39A-411F-8AA5-0698078F0179}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>Dfe Academies Contracts</Title>
<Authors>DFE-Digital</Authors>
<PackageProjectUrl>https://github.com/DFE-Digital/academisation-nuget-packages/tree/main/academiesContracts</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/DFE-Digital/academisation-nuget-packages</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.0</Version>
</PropertyGroup>

<ItemGroup>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
namespace Dfe.Academies.Contracts.Establishments;

[Serializable]
public class EstablishmentDto
{

public string Urn { get; set; }
public string Name { get; set; }
public string LocalAuthorityCode { get; set; }
public string LocalAuthorityName { get; set; }
public string OfstedRating { get; set; }
public string OfstedLastInspection { get; set; }
public string StatutoryLowAge { get; set; }
public string StatutoryHighAge { get; set; }
public string SchoolCapacity { get; set; }
public string Pfi { get; set; }
public string EstablishmentNumber { get; set; }
public NameAndCodeDto Diocese { get; set; }
public NameAndCodeDto EstablishmentType { get; set; }
public NameAndCodeDto Gor { get; set; }
public NameAndCodeDto PhaseOfEducation { get; set; }
public NameAndCodeDto ReligiousCharacter { get; set; }
public NameAndCodeDto ParliamentaryConstituency { get; set; }
public CensusDto Census { get; set; }
public MisEstablishmentDto MISEstablishment { get; set; }
public AddressDto Address { get; set; }
}

[Serializable]
public class NameAndCodeDto
{
public string Name { get; set; }
public string Code { get; set; }
}

[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; }

}

[Serializable]
public class MisEstablishmentDto
{
public string DateOfLatestSection8Inspection { get; set; }
public string InspectionEndDate { get; set; }

public string OverallEffectiveness { get; set; }
public string QualityOfEducation { get; set; }
public string BehaviourAndAttitudes { get; set; }
public string PersonalDevelopment { get; set; }
public string EffectivenessOfLeadershipAndManagement { get; set; }

public string EarlyYearsProvision { get; set; }
public string SixthFormProvision { get; set; }
public string Weblink { get; set; }
}

[Serializable]
public class CensusDto
{
public string NumberOfPupils { get; set; }
public string PercentageFsm { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace Dfe.Academies.Contracts.Trusts;

[Serializable]
public class TrustDto
{
public string Name { get; set; }

public string Ukprn { get; set; }

public string CompaniesHouseNumber { get; set; }

public string ReferenceNumber { get; set; }

public AddressDto Address { get; set; }

}

[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; }
}

0 comments on commit b15585e

Please sign in to comment.