Skip to content

Merge pull request #115 from f-aa/initial-github-action #1

Merge pull request #115 from f-aa/initial-github-action

Merge pull request #115 from f-aa/initial-github-action #1

Workflow file for this run

name: Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-2019
env:
Solution_Name: Holos.sln
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Restore nuget packages
run: msbuild $env:Solution_Name /t:Restore
env:
Configuration: ${{ matrix.configuration }}
- name: Build solution
run: msbuild $env:Solution_Name /p:platform="Any CPU" /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Run Tests
run: vstest.console.exe ./**/bin/${{ matrix.configuration }}/H.*.Test.dll /Parallel
- name: Upload build artifacts
if: ${{ matrix.configuration == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: Files-${{ matrix.configuration }}
path: '**/*/bin/*'