-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
480d992
commit 9a2961c
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|