Skip to content
Open
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
17 changes: 0 additions & 17 deletions .github/dependabot.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/build-test-analyse.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/dependabot-packagelock-update.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/deploy.yml

This file was deleted.

31 changes: 25 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,32 @@ name: On Pull Request
on:
pull_request:
branches:
- main
- develop
paths:
- '**.cs'
- '**.csproj'

env:
DOTNET_VERSION: '7.0.102' # The .NET SDK version to use

jobs:
pull-request:
name: test, report, and analyse
uses: ./.github/workflows/build-test-analyse.yml
secrets: inherit
build-and-test:

name: build-and-test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

# job can be expanded to handle seperate pr actions such as close/merge/conflict
- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Debug --no-restore

- name: Run NUnit tests
run: dotnet test --no-build --configuration Debug --filter Category=IntegrationTests
41 changes: 0 additions & 41 deletions .github/workflows/push.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/workflow-dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Workflow Dispatch

on:
push:
branches:
- develop
workflow_dispatch: # Manual Trigger

env:
DOTNET_VERSION: '7.0.102' # The .NET SDK version to use

jobs:
build-and-test:

name: build-and-test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Debug --no-restore -nowarn:1591

- name: Run NUnit tests
run: dotnet test --no-build --configuration Debug --filter Category=IntegrationTests
27 changes: 24 additions & 3 deletions Answer.King.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Answer.King.Api.UnitTests",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{B13B327D-8EF3-4B55-A522-648B46176A62}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
README.md = README.md
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
global.json = global.json
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Answer.King.Infrastructure.UnitTests", "tests\Answer.King.Infrastructure.UnitTests\Answer.King.Infrastructure.UnitTests.csproj", "{C1175B84-7518-404B-9DA7-85D0BF051C6B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Answer.King.Infrastructure.UnitTests", "tests\Answer.King.Infrastructure.UnitTests\Answer.King.Infrastructure.UnitTests.csproj", "{C1175B84-7518-404B-9DA7-85D0BF051C6B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Answer.King.IntegrationTests", "tests\Answer.King.IntegrationTests\Answer.King.IntegrationTests.csproj", "{E794D3D2-E323-48AB-A507-FA361E060618}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A7366D48-A55F-477D-AC26-8D061A839D37}"
ProjectSection(SolutionItems) = preProject
.github\workflows\pull-request.yml = .github\workflows\pull-request.yml
.github\workflows\workflow-dispatch.yaml = .github\workflows\workflow-dispatch.yaml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -123,6 +131,18 @@ Global
{C1175B84-7518-404B-9DA7-85D0BF051C6B}.Release|x64.Build.0 = Release|Any CPU
{C1175B84-7518-404B-9DA7-85D0BF051C6B}.Release|x86.ActiveCfg = Release|Any CPU
{C1175B84-7518-404B-9DA7-85D0BF051C6B}.Release|x86.Build.0 = Release|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Debug|x64.ActiveCfg = Debug|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Debug|x64.Build.0 = Debug|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Debug|x86.ActiveCfg = Debug|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Debug|x86.Build.0 = Debug|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Release|Any CPU.Build.0 = Release|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Release|x64.ActiveCfg = Release|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Release|x64.Build.0 = Release|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Release|x86.ActiveCfg = Release|Any CPU
{E794D3D2-E323-48AB-A507-FA361E060618}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -135,6 +155,7 @@ Global
{625E8357-4943-46FB-AB0E-C25CF0A3AB02} = {F3A9A152-CBD9-4004-9745-1478B24AEB9B}
{4C8C0B44-7F02-4F69-A3BA-0AD7E9231BAD} = {F3A9A152-CBD9-4004-9745-1478B24AEB9B}
{C1175B84-7518-404B-9DA7-85D0BF051C6B} = {F3A9A152-CBD9-4004-9745-1478B24AEB9B}
{E794D3D2-E323-48AB-A507-FA361E060618} = {F3A9A152-CBD9-4004-9745-1478B24AEB9B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B0807BAF-430C-45E0-89FB-DB6ABAF9D5C4}
Expand Down
5 changes: 1 addition & 4 deletions src/Answer.King.Api/Answer.King.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,11 @@

<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).UnitTests" />
<InternalsVisibleTo Include="$(AssemblyName).IntegrationTests" />
</ItemGroup>

<ItemGroup>
<None Include="appsettings.Production.json" />
</ItemGroup>

<ItemGroup>
<Folder Include="db\" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions src/Answer.King.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,8 @@
app.MapHealthChecks("/health");

app.Run();

#pragma warning disable SA1601
public partial class Program
{
}
2 changes: 1 addition & 1 deletion src/Answer.King.Domain/Answer.King.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702</NoWarn>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

</Project>
Loading