Skip to content

Replaces failing github actions test plugin with more native solution #78

Replaces failing github actions test plugin with more native solution

Replaces failing github actions test plugin with more native solution #78

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
env:
SOLUTION_FILE_PATH: .
TEST_RESULTS_DIR: "${{ github.workspace }}\\TestResults"
DEFAULT_BRANCH: main
jobs:
build:
runs-on: windows-2022
permissions:
checks: write
defaults:
run:
working-directory: ${{ github.workspace }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 0
- name: Prepare test submodules
shell: pwsh
run: |
./Scripts/UpdateSubmodules.ps1
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.config') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
with:
vs-version: '[17.0, ]'
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Restore NuGet packages
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
run: msbuild ${{env.SOLUTION_FILE_PATH}} /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
shell: powershell
- name: Test
run: dotnet test ${{env.SOLUTION_FILE_PATH}} --logger "trx;LogFileName=TestResults/tests.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: Test results
path: "TestResults/*.trx"
reporter: dotnet-trx
fail-on-error: true