Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions for build and test #178

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

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 }}