CreamInstaller/.github/workflows/checks.yml
2021-08-09 05:43:20 -05:00

59 lines
1.3 KiB
YAML

name: Checks
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
env:
Solution_Name: CreamInstaller.sln
Test_Project_Path: CreamInstaller\CreamInstaller.csproj
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore Project
run: dotnet restore
- name: Build Project
run: dotnet build --no-restore --configuration $env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Test Project
run: dotnet test --no-build --verbosity normal --configuration $env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Restore Solution
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Build Solution
run: msbuild $env:Solution_Name /t:Build /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}