From cc26f84c756fdced9de6a5146d41369fe0a295cc Mon Sep 17 00:00:00 2001 From: Akam27 Date: Tue, 30 Nov 2021 17:00:08 +0100 Subject: [PATCH 1/2] added new workflow --- .github/workflows/dotnet.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..31607fa --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,25 @@ +name: .NET + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal From 53bc49a80f2b70fd8f59baa9071776c2aed0acc7 Mon Sep 17 00:00:00 2001 From: Akam27 Date: Tue, 30 Nov 2021 17:55:05 +0100 Subject: [PATCH 2/2] create a new branch --- SampleFunctionApp.Test/FunctionsTest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SampleFunctionApp.Test/FunctionsTest.cs b/SampleFunctionApp.Test/FunctionsTest.cs index cd0c511..7d69a86 100644 --- a/SampleFunctionApp.Test/FunctionsTest.cs +++ b/SampleFunctionApp.Test/FunctionsTest.cs @@ -19,6 +19,14 @@ public async void HttpTriggerWithParams() + [Fact] + public async void HttpTriggerWithoutParams() + { + var request = TestFactory.CreateHttpRequest("", ""); + var response = (OkObjectResult)await Function1.Run(request, logger); + Assert.Equal("Hello there! Welcome to Azure Functions!", response.Value); + } + [Fact] public async void HttpTriggerWithoutParams() {