Bump MSTest.TestFramework from 3.0.4 to 3.1.1 in /Source/Bluechirp.Tests #108
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
name: .NET Framework | |
on: | |
push: | |
branches: [ "master" ] | |
paths: | |
- '**.cs' | |
- '**.csproj' | |
pull_request: | |
branches: [ "master" ] | |
paths: | |
- '**.cs' | |
- '**.csproj' | |
workflow_dispatch: | |
jobs: | |
run-unit-tests: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
targetplatform: [x64] | |
runs-on: windows-latest | |
env: | |
TestProjectPath: Source\Bluechirp.Tests\Bluechirp.Tests.csproj | |
TestExecutablePath: Source\Bluechirp.Tests\bin\${{ matrix.targetplatform }}\${{ matrix.configuration }}\Bluechirp.Tests.build.appxrecipe | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Build | |
uses: microsoft/[email protected] | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Build Tests | |
run: > | |
msbuild ${{ env.TestProjectPath }} -t:restore /p:Platform=${{ matrix.targetplatform }} /p:Configuration=${{ matrix.configuration }}; | |
msbuild ${{ env.TestProjectPath }} -t:build /p:Platform=${{ matrix.targetplatform }} /p:Configuration=${{ matrix.configuration }} | |
# Execute all unit tests in the solution | |
- name: Execute Tests | |
run: > | |
$vs_path = vswhere -latest -products * -requires Microsoft.VisualStudio.Workload.ManagedDesktop -requiresAny -property installationPath; | |
$vstest_path = join-path $vs_path 'Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'; | |
& $vstest_path /Platform:${{ matrix.targetplatform }} /framework:frameworkuap10 ${{ env.TestExecutablePath }} | |