Skip to content

Commit 665451a

Browse files
Github Actions for build and test
1 parent 7d97109 commit 665451a

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/PR.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
name: Hearthis CI workflow
3+
4+
on:
5+
pull_request:
6+
branches: [ master ]
7+
8+
jobs:
9+
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@5a4ac90
20+
with:
21+
fetch-depth: 0
22+
23+
# Install the .NET Core workload
24+
- name: Install .NET Core
25+
uses: actions/setup-dotnet@51f6837
26+
with:
27+
dotnet-version: 5.0.x
28+
29+
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
30+
- name: Setup MSBuild.exe (Windows OS)
31+
uses: microsoft/setup-msbuild@c26a08b
32+
env:
33+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step
34+
if: ${{ matrix.os == 'windows-latest' }}
35+
36+
# Run the unit tests
37+
- name: Restore and Build
38+
env:
39+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So gitversion can set environment vars during the build
40+
run: msbuild build/build.proj /t:Build
41+
42+
- name: Test
43+
if: success()
44+
run: msbuild build/build.proj /t:Test
45+
46+
- name: Test Report
47+
uses: MirrorNG/nunit-reporter@eba9570
48+
if: always()
49+
with:
50+
path: output/**/TestResults.xml
51+
access-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)