diff --git a/csharp/Dockerfile b/csharp/Dockerfile new file mode 100644 index 0000000..a60c453 --- /dev/null +++ b/csharp/Dockerfile @@ -0,0 +1,13 @@ +FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine as build +WORKDIR /app + +COPY *.sln . +COPY TheatricalPlayersRefactoringKata/*.csproj ./TheatricalPlayersRefactoringKata/ +COPY TheatricalPlayersRefactoringKata.Tests/*.csproj ./TheatricalPlayersRefactoringKata.Tests/ +RUN dotnet restore + +COPY . . +RUN dotnet build + +FROM build AS test +RUN dotnet test --logger:console;verbosity=detailed \ No newline at end of file diff --git a/csharp/TheatricalPlayersRefactoringKata.sln b/csharp/TheatricalPlayersRefactoringKata.sln index 58d13ac..d539965 100644 --- a/csharp/TheatricalPlayersRefactoringKata.sln +++ b/csharp/TheatricalPlayersRefactoringKata.sln @@ -7,6 +7,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheatricalPlayersRefactorin EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheatricalPlayersRefactoringKata.Tests", "TheatricalPlayersRefactoringKata.Tests\TheatricalPlayersRefactoringKata.Tests.csproj", "{47FAD5CE-0FB3-4C9F-A430-68E58A1B094F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{F64093BF-B598-4217-913F-8B1B407AB2E5}" + ProjectSection(SolutionItems) = preProject + Dockerfile = Dockerfile + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU