From 9a2961c88f98c000405fb380d29917f000bb9fae Mon Sep 17 00:00:00 2001 From: Glenn <5834289+glennawatson@users.noreply.github.com> Date: Sun, 13 Dec 2020 13:35:28 +1100 Subject: [PATCH] Create build-samples.yml --- .github/workflows/build-samples.yml | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build-samples.yml diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml new file mode 100644 index 00000000..30dcef35 --- /dev/null +++ b/.github/workflows/build-samples.yml @@ -0,0 +1,50 @@ +name: Sample Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + + strategy: + matrix: + configuration: [Debug, Release] + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core 3.x + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.x + + - name: Install .NET 5.x + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.x + + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Restore/Build the sample + run: msbuild LoginApp.sln /t:restore,build /p:Configuration=$env:Configuration + working-directory: Sample + env: + Configuration: ${{ matrix.configuration }} + + # Execute all unit tests in the solution + - name: Execute unit tests + working-directory: Sample + run: dotnet test LoginApp.sln +