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
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0
FROM mcr.microsoft.com/dotnet/sdk:10.0

RUN \
echo "Install base packages" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
awscli \
unzip \
gnupg \
make \
jq

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install

WORKDIR /var/project
COPY . .
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ help:

.PHONY: build
build: ## Build project
dotnet build -f=net6
dotnet build -f=net10.0

.PHONY: format
format:
Expand All @@ -22,15 +22,15 @@ test: single-test

.PHONY: single-test
single-test: build ## run a single test. usage: "make single-test test=[test name]"
dotnet test ./src/GovukNotify.Tests/GovukNotify.Tests.csproj -f=net6 --no-build -v=n --filter $(test)
dotnet test ./src/GovukNotify.Tests/GovukNotify.Tests.csproj -f=net10.0 --no-build -v=n --filter $(test)

.PHONY: build-release
build-release: ## Build release version
dotnet build -c=Release -f=net6
dotnet build -c=Release -f=net10.0

.PHONY: build-package
build-package: build-release ## Build and package NuGet
dotnet pack -c=Release ./src/GovukNotify/GovukNotify.csproj /p:TargetFrameworks=net6 -o=publish
dotnet pack -c=Release ./src/GovukNotify/GovukNotify.csproj /p:TargetFrameworks=net8,net9,net10 -o=publish

.PHONY: bootstrap-with-docker
bootstrap-with-docker: ## Prepare the Docker builder image
Expand Down
10 changes: 4 additions & 6 deletions src/GovukNotify.Tests/GovukNotify.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6;net462</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="Moq" Version="4.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="NUnit" Version="4.5.1" />
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/GovukNotify.Tests/IntegrationTests/Assertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void AssertNotification(Notification notification)
Assert.IsNotNull(notification.type);
String notificationType = notification.type;
String[] allowedNotificationTypes = { "email", "sms", "letter" };
CollectionAssert.Contains(allowedNotificationTypes, notificationType);
Assert.That(allowedNotificationTypes, Does.Contain(notificationType));
if (notificationType.Equals("sms"))
{
Assert.IsNotNull(notification.phoneNumber);
Expand Down Expand Up @@ -45,7 +45,7 @@ public static void AssertNotification(Notification notification)
"virus-scan-failed",
"validation-failed"
};
CollectionAssert.Contains(allowedStatusTypes, notificationStatus);
Assert.That(allowedStatusTypes, Does.Contain(notificationStatus));

if (notificationStatus.Equals("delivered"))
{
Expand Down
11 changes: 4 additions & 7 deletions src/GovukNotify/GovukNotify.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<TargetFrameworks>netstandard2.0;net6;net462</TargetFrameworks>
<Version>7.2.0</Version>
<TargetFrameworks>net10.0</TargetFrameworks>
<Version>8.0.0</Version>
<Authors>GOV.UK Notify</Authors>
<Description>GOV.UK .NET Notify Client</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand All @@ -16,11 +16,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JWT" Version="[7.1,9)" />
<PackageReference Include="Newtonsoft.Json" Version="[10.0.3,14)" />
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.0" />
<PackageReference Include="JWT" Version="[11,12]" />
<PackageReference Include="Newtonsoft.Json" Version="[13.0.4,14]" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
Expand Down
Loading