Skip to content

Github Actions for build and test #2

Github Actions for build and test

Github Actions for build and test #2

Workflow file for this run

name: Hearthis CI workflow
on:
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@5a4ac90
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@51f6837
with:
dotnet-version: 5.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe (Windows OS)
uses: microsoft/setup-msbuild@c26a08b
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step
if: ${{ matrix.os == 'windows-latest' }}
# Run the unit tests
- name: Restore and Build
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So gitversion can set environment vars during the build
run: msbuild build/build.proj /t:Build
- name: Test
if: success()
run: msbuild build/build.proj /t:Test
- name: Test Report
uses: MirrorNG/nunit-reporter@eba9570
if: always()
with:
path: output/**/TestResults.xml
access-token: ${{ secrets.GITHUB_TOKEN }}