-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace e-mail sender with an http function
- Loading branch information
Showing
61 changed files
with
691 additions
and
923 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy dotnet core app to Azure Function App - oddscollector-functions | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'OddsCollector.Functions' # set this to the path to your web app project, defaults to the repository root | ||
DOTNET_VERSION: '8.0.x' # set this to the dotnet version to use | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: 'Resolve Project Dependencies Using Dotnet' | ||
shell: pwsh | ||
run: | | ||
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | ||
dotnet build --configuration Release --output ./output | ||
popd | ||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'oddscollector-functions' | ||
slot-name: 'Production' | ||
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_84942172C4BE4DDDBE1C48EFB32A2A9A }} |
31 changes: 31 additions & 0 deletions
31
OddsCollector.Functions.Tests/Common/Models/EventPredictionBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using OddsCollector.Functions.Models; | ||
using OddsCollector.Functions.Strategies; | ||
|
||
namespace OddsCollector.Functions.Tests.Common.Models; | ||
|
||
internal static class EventPredictionBuilderExtensions | ||
{ | ||
public const string DefaultId = "4acd8f2675ca847ba33eea3664f6c0bb"; | ||
public const string DefaultAwayTeam = "Liverpool"; | ||
public const string DefaultBookmaker = "betclic"; | ||
public const string DefaultHomeTeam = "Manchester City"; | ||
public const string DefaultStrategy = nameof(AdjustedConsensusStrategy); | ||
public const string DefaultWinner = "Manchester City"; | ||
public static readonly DateTime DefaultCommenceTime = new(2023, 11, 25, 12, 30, 0); | ||
public static readonly Guid DefaultTraceId = new("447b57dd-84bc-4e79-95d0-695f7493bf41"); | ||
public static readonly DateTime DefaultTimestamp = new(2023, 11, 25, 15, 30, 0); | ||
|
||
public static EventPredictionBuilder SetDefaults(this EventPredictionBuilder builder) | ||
{ | ||
return builder | ||
.SetId(DefaultId) | ||
.SetAwayTeam(DefaultAwayTeam) | ||
.SetBookmaker(DefaultBookmaker) | ||
.SetCommenceTime(DefaultCommenceTime) | ||
.SetHomeTeam(DefaultHomeTeam) | ||
.SetStrategy(DefaultStrategy) | ||
.SetTraceId(DefaultTraceId) | ||
.SetTimestamp(DefaultTimestamp) | ||
.SetWinner(DefaultWinner); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
OddsCollector.Functions.Tests/Common/Models/OddsBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using OddsCollector.Functions.Models; | ||
|
||
namespace OddsCollector.Functions.Tests.Common.Models; | ||
|
||
internal static class OddsBuilderExtensions | ||
{ | ||
public const double DefaultAway1 = 4.08; | ||
public const string DefaultBookmaker1 = "betclic"; | ||
public const double DefaultDraw1 = 3.82; | ||
public const double DefaultHome1 = 1.8; | ||
|
||
public const double DefaultAway2 = 4.33; | ||
public const string DefaultBookmaker2 = "sport888"; | ||
public const double DefaultDraw2 = 4.33; | ||
public const double DefaultHome2 = 1.7; | ||
|
||
public const double DefaultAway3 = 4.5; | ||
public const string DefaultBookmaker3 = "mybookieag"; | ||
public const double DefaultDraw3 = 4.5; | ||
public const double DefaultHome3 = 1.67; | ||
|
||
public static OddBuilder SetDefaults1(this OddBuilder builder) | ||
{ | ||
return builder | ||
.SetAway(DefaultAway1) | ||
.SetBookmaker(DefaultBookmaker1) | ||
.SetHome(DefaultHome1) | ||
.SetDraw(DefaultDraw1); | ||
} | ||
|
||
public static OddBuilder SetDefaults2(this OddBuilder builder) | ||
{ | ||
return builder | ||
.SetAway(DefaultAway2) | ||
.SetBookmaker(DefaultBookmaker2) | ||
.SetHome(DefaultHome2) | ||
.SetDraw(DefaultDraw2); | ||
} | ||
|
||
public static OddBuilder SetDefaults3(this OddBuilder builder) | ||
{ | ||
return builder | ||
.SetAway(DefaultAway3) | ||
.SetBookmaker(DefaultBookmaker3) | ||
.SetHome(DefaultHome3) | ||
.SetDraw(DefaultDraw3); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 0 additions & 85 deletions
85
OddsCollector.Functions.Tests/CommunicationServices/EmailSenderOptionsTests.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.