From 17efe8d1da4c3ecdeed263c9c05b7ffce44a410e Mon Sep 17 00:00:00 2001 From: Yas Ikeda Date: Thu, 28 May 2020 06:22:35 +1200 Subject: [PATCH 1/3] add dotnet core workflow --- .github/workflows/dotnet-core.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml new file mode 100644 index 0000000..9657e87 --- /dev/null +++ b/.github/workflows/dotnet-core.yml @@ -0,0 +1,25 @@ +name: .NET Core + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.300 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore --verbosity normal From 2155e3718bb4b34be1c83db02bc2a8c04041d1e8 Mon Sep 17 00:00:00 2001 From: Yas Ikeda Date: Thu, 28 May 2020 06:34:57 +1200 Subject: [PATCH 2/3] specify build target dotnet-core workflow failed because dotnet CLI could not identify build target because this repo contains a csproj file besides the sln file at root dir. fix this issue by specifying the solution file to run the aiming build. --- .github/workflows/dotnet-core.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 9657e87..97835ad 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -18,8 +18,8 @@ jobs: with: dotnet-version: 3.1.300 - name: Install dependencies - run: dotnet restore + run: dotnet restore RestApi.sln - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore RestApi.sln - name: Test - run: dotnet test --no-restore --verbosity normal + run: dotnet test --no-restore --verbosity normal RestApi.sln From 1340db80810a8d47a2e3e3af6d7d7c9c7fd7dcbb Mon Sep 17 00:00:00 2001 From: Yas Ikeda Date: Thu, 28 May 2020 06:42:10 +1200 Subject: [PATCH 3/3] try a longer timeout for service start-up in tests test run failed during dotnet-core workflow because service didn't get ready within timeout duration. Giving so much enough timeout, I would like to confirm this is actually timeout issue or something else. --- RestApi.Test/SetUp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RestApi.Test/SetUp.cs b/RestApi.Test/SetUp.cs index ab36666..85987b6 100644 --- a/RestApi.Test/SetUp.cs +++ b/RestApi.Test/SetUp.cs @@ -12,7 +12,7 @@ namespace RestApi.Test [SetUpFixture] public class SetUp { - public const int ApiServiceStartUpTimeoutSeconds = 7; + public const int ApiServiceStartUpTimeoutSeconds = 60; public static Task ApiService; public const string ApiServiceBaseUrl = "https://localhost:62184";