From eca3cda10b6f37aa34bdfeb0778568a799435c63 Mon Sep 17 00:00:00 2001 From: Yizhen Shi Date: Tue, 6 Dec 2022 10:07:39 -0500 Subject: [PATCH 1/4] try to add dotnet core jobs + try build dotnet framework --- .github/workflows/net-ci.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/net-ci.yml b/.github/workflows/net-ci.yml index 093548d..a290d5c 100644 --- a/.github/workflows/net-ci.yml +++ b/.github/workflows/net-ci.yml @@ -3,12 +3,36 @@ name: .NET CI on: push: branches: - - master + - "*" pull_request: branches: - master jobs: +# Build and test on .NET Core + dotnet-core-ci: + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v2 + + - name: Set up .NET + uses: actions/setup-dotnet@v1.7.2 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Install dependencies + run: nuget restore + + - name: Build solution + run: dotnet build + + - name: Run tests + run: dotnet test + + # - name: Run linter + # run: dotnet format --verify-no-changes + # Build and test on .NET Framework dotnet-framework-ci: runs-on: windows-2022 @@ -23,7 +47,7 @@ jobs: uses: darenm/Setup-VSTest@v1 - name: Build DuoApiTest solution - run: msbuild.exe test/DuoAPiTest.sln + run: msbuild.exe duo_api_csharp.sln - - name: Run Tests dll - run: vstest.console.exe .\test\bin\Debug\test.dll \ No newline at end of file + # - name: Run Tests dll + # run: vstest.console.exe .\test\bin\Debug\test.dll \ No newline at end of file From 055f4059fd30bc7357ac69707665617a403d0575 Mon Sep 17 00:00:00 2001 From: Yizhen Shi Date: Tue, 6 Dec 2022 10:11:55 -0500 Subject: [PATCH 2/4] add nuget restore to dotnet framework --- .github/workflows/net-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/net-ci.yml b/.github/workflows/net-ci.yml index a290d5c..2a344d8 100644 --- a/.github/workflows/net-ci.yml +++ b/.github/workflows/net-ci.yml @@ -46,6 +46,9 @@ jobs: - name: Set up VSTest uses: darenm/Setup-VSTest@v1 + - name: Install dependencies + run: nuget restore + - name: Build DuoApiTest solution run: msbuild.exe duo_api_csharp.sln From c81e21739132d032651a51d96a345320a6fe695c Mon Sep 17 00:00:00 2001 From: Yizhen Shi Date: Tue, 6 Dec 2022 10:14:48 -0500 Subject: [PATCH 3/4] add test back into it --- .github/workflows/net-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/net-ci.yml b/.github/workflows/net-ci.yml index 2a344d8..81da101 100644 --- a/.github/workflows/net-ci.yml +++ b/.github/workflows/net-ci.yml @@ -52,5 +52,5 @@ jobs: - name: Build DuoApiTest solution run: msbuild.exe duo_api_csharp.sln - # - name: Run Tests dll - # run: vstest.console.exe .\test\bin\Debug\test.dll \ No newline at end of file + - name: Run Tests dll + run: vstest.console.exe .\test\bin\Debug\test.dll \ No newline at end of file From 961c1092ebd53ec2c46e284b9a71c701aef2ee84 Mon Sep 17 00:00:00 2001 From: Yizhen Shi <61877973+yizshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 10:42:36 -0500 Subject: [PATCH 4/4] Revert to run only on master branch --- .github/workflows/net-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/net-ci.yml b/.github/workflows/net-ci.yml index 81da101..07a524b 100644 --- a/.github/workflows/net-ci.yml +++ b/.github/workflows/net-ci.yml @@ -3,7 +3,7 @@ name: .NET CI on: push: branches: - - "*" + - master pull_request: branches: - master @@ -53,4 +53,4 @@ jobs: run: msbuild.exe duo_api_csharp.sln - name: Run Tests dll - run: vstest.console.exe .\test\bin\Debug\test.dll \ No newline at end of file + run: vstest.console.exe .\test\bin\Debug\test.dll