Skip to content

Commit

Permalink
Merge 310fe4b into ac48c18
Browse files Browse the repository at this point in the history
  • Loading branch information
dlidstrom authored Nov 29, 2021
2 parents ac48c18 + 310fe4b commit 238b6b8
Show file tree
Hide file tree
Showing 188 changed files with 1,950 additions and 1,202 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/cache@v2
id: cache
with:
path: ~/.nuget/packages
path: packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
Expand All @@ -43,10 +43,15 @@ jobs:
#if: steps.cache.outputs.cache-hit != 'true'
run: |
nuget restore Snittlistan.sln
Get-ChildItem -Recurse C:\Users\runneradmin\.nuget
- name: Build
run: msbuild build.build -t:All -p:Version=$env:BUILD_VERSION -p:WIX_PATH=$env:wix -p:NUnitConsoleRunnerPath=C:\Users\runneradmin\.nuget\packages\nunit.consolerunner\3.12.0\
run: msbuild build.build -t:All -p:Version=$env:BUILD_VERSION -p:WIX_PATH=$env:wix -p:NUnitConsoleRunnerPath=packages\nunit.consolerunner\3.12.0\

- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: 'Test Result'
path: Build\_build\TestResult.html

- name: Push tag
id: tag
Expand All @@ -55,6 +60,18 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.BUILD_VERSION }}

- name: Comment pull request
uses: actions/[email protected]
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const filename = "Build/_build/TestResult.html";
const contents = fs.readFileSync(filename, "utf8");
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({ issue_number, owner, repo, body: contents });
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -64,7 +81,7 @@ jobs:
tag_name: ${{ steps.tag.outputs.new_tag }}
release_name: Release v${{ steps.tag.outputs.new_tag }}
draft: false
prerelease: false
prerelease: ${{ github.event_name == 'pull_request' }}

- name: Upload artifact
id: upload-artifact
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ obj/
_ReSharper*/
[Tt]est[Rr]esult*
packages
Snittlistan.Web/Web.Release.config
Snittlistan.Web/Snittlistan.Publish.xml
Snittlistan.Web/App_Data/Database
Tools/
Expand Down
10 changes: 10 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="./packages" />
<add key="globalPackagesFolder" value="./packages" />
</config>
<settings>
<repositoryPath>./packages</repositoryPath>
</settings>
</configuration>
4 changes: 0 additions & 4 deletions Snittlistan.Queue.ConsoleHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ namespace Snittlistan.Queue.ConsoleHost
{
using System;
using System.Configuration;
using Npgsql.Logging;
using Snittlistan.Queue.Config;
using Snittlistan.Queue.Infrastructure;

public class Program
{
public static void Main()
{
Console.WriteLine("Press [ENTER] to start.");
_ = Console.ReadLine();
NpgsqlLogManager.Provider = new NLogLoggingProvider();
NpgsqlLogManager.IsParameterLoggingEnabled = true;
Application application = new(
(MessagingConfigSection)ConfigurationManager.GetSection("messaging"),
ConfigurationManager.AppSettings["UrlScheme"],
Expand Down
96 changes: 0 additions & 96 deletions Snittlistan.Queue.ConsoleHost/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@
"resolved": "4.7.12",
"contentHash": "cFe+YQVxghBt4hoB8IH+XVW/vyS6rWJPfWmm0rmgS/iaI3lzzFsGRzjw3VhByovLugw7Zp3kY7nVUWADCu6n2g=="
},
"EntityFramework": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "7jDmcQ3jaN5G7ZJC7Ecq161zQBs/5LqRzBdZ/I4XfmSvOwteGgNjOi30kthFador4Qjo3qUU6iOB1H04GIXrpg=="
},
"EntityFramework6.Npgsql": {
"type": "Transitive",
"resolved": "6.4.3",
"contentHash": "iZnc+FlaBaK97zGHR0KS0bnwKQ2gWPpaOoSYNHfjLZ4lr4UEPRFQnh/bpW9Q50ZbNNbDRCs+W12QyVn+sKsSwA==",
"dependencies": {
"EntityFramework": "6.4.0",
"Npgsql": "4.1.3"
}
},
"Microsoft.AspNet.WebApi.Client": {
"type": "Transitive",
"resolved": "5.2.7",
Expand All @@ -36,14 +22,6 @@
"Newtonsoft.Json": "6.0.4"
}
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "K63Y4hORbBcKLWH5wnKgzyn7TOfYzevIEwIedQHBIkmkEBA9SCqgvom+XTuE+fAFGvINGkhFItaZ2dvMGdT5iw==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"MicrosoftWebMvc": {
"type": "Transitive",
"resolved": "2.0.0",
Expand All @@ -70,83 +48,9 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "4.1.3",
"contentHash": "sWTXCb6WPPO7WEw4+1XoRqE49EdWmuyMA15LVbzV6jZgRxYWK8TbdniWMjguzmAgOZVYTmrCf+jsqPYoSqACvA==",
"dependencies": {
"System.Memory": "4.5.3",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Json": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.3",
"System.ValueTuple": "4.5.0"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "HxozeSlipUK7dAroTYwIcGwKDeOVpQnJlpVaOkBz7CM4TsE5b/tKlQBZecTjh6FzcSbxndYaxxpsBMz+wMJeyw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "BXgFO8Yi7ao7hVA/nklD0Hre1Bbce048ZqryGZVFifGNPuh+2jqF1i/jLJLMfFGZIzUOw+nCIeH24SQhghDSPw==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.0.0",
"System.Buffers": "4.5.0",
"System.Memory": "4.5.3",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Encodings.Web": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.2",
"System.ValueTuple": "4.5.0"
}
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"snittlistan.queue": {
"type": "Project",
"dependencies": {
"EntityFramework6.Npgsql": "6.4.3",
"Lindhart.Analyser.MissingAwaitWarning": "2.0.0",
"Microsoft.AspNet.WebApi.Client": "5.2.7",
"MvcContrib": "2.0.95",
Expand Down
16 changes: 0 additions & 16 deletions Snittlistan.Queue.WindowsServiceHost/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
<configuration>
<configSections>
<section name="messaging" type="Snittlistan.Queue.Config.MessagingConfigSection, Snittlistan.Queue" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework" />
</configSections>
<appSettings>
<add key="UrlScheme" value="http" />
<add key="Port" value="61026"/>
</appSettings>
<connectionStrings>
<add name="DatabaseContext" connectionString="Server=localhost;Database=snittlistan;Username=postgres;Password=postgres" providerName="Npgsql" />
</connectionStrings>
<messaging>
<queueListeners>
<!-- name attribute must be unique -->
Expand All @@ -22,18 +18,6 @@
<add name="TaskQueue" isEnabled="true" readQueue=".\Private$\taskqueue" workerThreads="1" autoCreateQueues="true" />
</queueListeners>
</messaging>
<entityFramework>
<providers>
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" />
</providers>
<!-- setting the default connection factory is optional -->
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, EntityFramework6.Npgsql" />
</entityFramework>
<system.data>
<DbProviderFactories>
<add name="Npgsql Provider" invariant="Npgsql" description=".NET Framework Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=4.1.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
</DbProviderFactories>
</system.data>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
Expand Down
4 changes: 0 additions & 4 deletions Snittlistan.Queue.WindowsServiceHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ namespace Snittlistan.Queue.WindowsServiceHost
using System;
using System.ServiceProcess;
using NLog;
using Npgsql.Logging;
using Snittlistan.Queue.Infrastructure;

public static class Program
{
Expand All @@ -17,8 +15,6 @@ public static void Main()
try
{
Logger.Info("Starting queue service host");
NpgsqlLogManager.Provider = new NLogLoggingProvider();
NpgsqlLogManager.IsParameterLoggingEnabled = true;
Run();
}
catch (Exception ex)
Expand Down
96 changes: 0 additions & 96 deletions Snittlistan.Queue.WindowsServiceHost/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@
"resolved": "4.7.12",
"contentHash": "cFe+YQVxghBt4hoB8IH+XVW/vyS6rWJPfWmm0rmgS/iaI3lzzFsGRzjw3VhByovLugw7Zp3kY7nVUWADCu6n2g=="
},
"EntityFramework": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "7jDmcQ3jaN5G7ZJC7Ecq161zQBs/5LqRzBdZ/I4XfmSvOwteGgNjOi30kthFador4Qjo3qUU6iOB1H04GIXrpg=="
},
"EntityFramework6.Npgsql": {
"type": "Transitive",
"resolved": "6.4.3",
"contentHash": "iZnc+FlaBaK97zGHR0KS0bnwKQ2gWPpaOoSYNHfjLZ4lr4UEPRFQnh/bpW9Q50ZbNNbDRCs+W12QyVn+sKsSwA==",
"dependencies": {
"EntityFramework": "6.4.0",
"Npgsql": "4.1.3"
}
},
"Microsoft.AspNet.WebApi.Client": {
"type": "Transitive",
"resolved": "5.2.7",
Expand All @@ -36,14 +22,6 @@
"Newtonsoft.Json": "6.0.4"
}
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "K63Y4hORbBcKLWH5wnKgzyn7TOfYzevIEwIedQHBIkmkEBA9SCqgvom+XTuE+fAFGvINGkhFItaZ2dvMGdT5iw==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"MicrosoftWebMvc": {
"type": "Transitive",
"resolved": "2.0.0",
Expand All @@ -70,83 +48,9 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "4.1.3",
"contentHash": "sWTXCb6WPPO7WEw4+1XoRqE49EdWmuyMA15LVbzV6jZgRxYWK8TbdniWMjguzmAgOZVYTmrCf+jsqPYoSqACvA==",
"dependencies": {
"System.Memory": "4.5.3",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Json": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.3",
"System.ValueTuple": "4.5.0"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "HxozeSlipUK7dAroTYwIcGwKDeOVpQnJlpVaOkBz7CM4TsE5b/tKlQBZecTjh6FzcSbxndYaxxpsBMz+wMJeyw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "BXgFO8Yi7ao7hVA/nklD0Hre1Bbce048ZqryGZVFifGNPuh+2jqF1i/jLJLMfFGZIzUOw+nCIeH24SQhghDSPw==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.0.0",
"System.Buffers": "4.5.0",
"System.Memory": "4.5.3",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Encodings.Web": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.2",
"System.ValueTuple": "4.5.0"
}
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"snittlistan.queue": {
"type": "Project",
"dependencies": {
"EntityFramework6.Npgsql": "6.4.3",
"Lindhart.Analyser.MissingAwaitWarning": "2.0.0",
"Microsoft.AspNet.WebApi.Client": "5.2.7",
"MvcContrib": "2.0.95",
Expand Down
5 changes: 4 additions & 1 deletion Snittlistan.Queue/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public void Start()
{
foreach (QueueListenerElement listener in messagingConfigSection.QueueListeners.Listeners)
{
TaskQueueListener taskQueueListener = new(listener.CreateSettings(), urlScheme, port);
TaskQueueListener taskQueueListener = new(
listener.CreateSettings(),
urlScheme,
port);
taskQueueListener.Start();
taskQueueListeners.Add(taskQueueListener);
}
Expand Down
Loading

0 comments on commit 238b6b8

Please sign in to comment.