Skip to content

Commit

Permalink
chore: clean up solution
Browse files Browse the repository at this point in the history
  • Loading branch information
EnisMulic committed Nov 2, 2023
1 parent ff5a059 commit f70a375
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 145 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
on:
[push, pull_request]
on: [push, pull_request]
permissions:
id-token: write
contents: read
checks: write

jobs:
build:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/checkout@main

- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'

- name: Restore dependencies
run: dotnet restore
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"

- name: Build
run: dotnet build --configuration Release --no-restore
- name: Restore dependencies
run: dotnet restore

- name: Test
run: dotnet test --no-restore --verbosity normal --logger trx --results-directory ./test-results/ /p:CI=true
- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test Reporter
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: xUnit Tests
path: 'test-results/*.trx'
reporter: dotnet-trx
- name: Test
run: dotnet test --no-restore --verbosity normal --logger trx --results-directory ./test-results/ /p:CI=true tests/Application.UnitTests

- name: Test Reporter
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: NUnit Tests
path: "test-results/*.trx"
reporter: dotnet-trx
35 changes: 0 additions & 35 deletions Application.IntegrationTests/Application.IntegrationTests.csproj

This file was deleted.

63 changes: 0 additions & 63 deletions Application.IntegrationTests/SqlServerTestDatabase.cs

This file was deleted.

12 changes: 6 additions & 6 deletions ProjectName.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Api", "src\Api\Api.csproj",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.UnitTests", "tests\Application.UnitTests\Application.UnitTests.csproj", "{5BD8ACD6-1359-4B11-9FA3-CEEAB166ABA6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.IntegrationTests", "Application.IntegrationTests\Application.IntegrationTests.csproj", "{E99F15BD-F69D-4A9F-8299-0A550C1EFB9F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.IntegrationTests", "tests\Application.IntegrationTests\Application.IntegrationTests.csproj", "{6001861A-6AEF-4B94-B6DF-51E2B3808526}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -38,10 +38,10 @@ Global
{5BD8ACD6-1359-4B11-9FA3-CEEAB166ABA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BD8ACD6-1359-4B11-9FA3-CEEAB166ABA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BD8ACD6-1359-4B11-9FA3-CEEAB166ABA6}.Release|Any CPU.Build.0 = Release|Any CPU
{E99F15BD-F69D-4A9F-8299-0A550C1EFB9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E99F15BD-F69D-4A9F-8299-0A550C1EFB9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E99F15BD-F69D-4A9F-8299-0A550C1EFB9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E99F15BD-F69D-4A9F-8299-0A550C1EFB9F}.Release|Any CPU.Build.0 = Release|Any CPU
{6001861A-6AEF-4B94-B6DF-51E2B3808526}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6001861A-6AEF-4B94-B6DF-51E2B3808526}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6001861A-6AEF-4B94-B6DF-51E2B3808526}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6001861A-6AEF-4B94-B6DF-51E2B3808526}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -50,7 +50,7 @@ Global
{76B429C4-8DB6-44C7-9D44-9CA12C1437AD} = {84E4F488-AD96-4861-8A7C-60DC688CB412}
{F4DB6C96-3881-43B3-9F31-213B544E2AE2} = {84E4F488-AD96-4861-8A7C-60DC688CB412}
{5BD8ACD6-1359-4B11-9FA3-CEEAB166ABA6} = {6C076B4D-FAAA-4B0F-81C6-C4BF20C9374E}
{E99F15BD-F69D-4A9F-8299-0A550C1EFB9F} = {6C076B4D-FAAA-4B0F-81C6-C4BF20C9374E}
{6001861A-6AEF-4B94-B6DF-51E2B3808526} = {6C076B4D-FAAA-4B0F-81C6-C4BF20C9374E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A4581B34-2E1F-4269-B30C-3C5382EAC4DD}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Respawn" Version="6.1.0" />
<PackageReference Include="Testcontainers" Version="3.5.0" />
<PackageReference Include="Testcontainers.MsSql" Version="3.5.0" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Application\Application.csproj" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion tests/Application.IntegrationTests/GlobalUsings.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ public static class TestDatabaseFactory
{
public static async Task<ITestDatabase> CreateAsync()
{
// var database = new TestContainersDatabase();
var database = new SqlServerTestDatabase();
var database = new TestContainersDatabase();

await database.InitialiseAsync();

Expand Down
File renamed without changes.
11 changes: 0 additions & 11 deletions tests/Application.IntegrationTests/UnitTest1.cs

This file was deleted.

File renamed without changes.

0 comments on commit f70a375

Please sign in to comment.