Skip to content

Commit

Permalink
Create build-samples.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored Dec 13, 2020
1 parent 480d992 commit 9a2961c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- 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

0 comments on commit 9a2961c

Please sign in to comment.