CreamInstaller/.github/workflows/checks.yml

60 lines
1.3 KiB
YAML
Raw Normal View History

2021-08-09 15:43:20 +05:00
name: Checks
2021-08-09 15:37:25 +05:00
2021-08-09 15:07:41 +05:00
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
2021-08-09 15:12:38 +05:00
runs-on: windows-latest
2021-08-09 15:07:41 +05:00
env:
2021-08-09 15:12:38 +05:00
Solution_Name: CreamInstaller.sln
Test_Project_Path: CreamInstaller\CreamInstaller.csproj
2021-08-09 15:07:41 +05:00
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
2021-08-09 15:07:41 +05:00
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore Project
run: dotnet restore
- name: Build Project
2021-08-09 15:33:53 +05:00
run: dotnet build --no-restore --configuration $env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Test Project
2021-08-09 15:42:38 +05:00
run: dotnet test --no-build --verbosity normal --configuration $env:Configuration
env:
Configuration: ${{ matrix.configuration }}
2021-08-09 15:12:38 +05:00
- name: Setup MSBuild
2021-08-09 15:07:41 +05:00
uses: microsoft/setup-msbuild@v1.0.2
- name: Restore Solution
2021-08-09 15:07:41 +05:00
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 }}