Browse Source

Save NUnit test results and report it in Github Actions.

pull/1480/head
Joao Matos 5 years ago
parent
commit
0539255fdf
  1. 12
      .github/workflows/main.yml
  2. 7
      build/RunTests.sh

12
.github/workflows/main.yml

@ -31,6 +31,12 @@ jobs: @@ -31,6 +31,12 @@ jobs:
- name: Test
run: build/RunTests.sh
- uses: MirrorNG/nunit-reporter@v1.0.9
if: always()
with:
path: build/**/TestResult.xml
access-token: ${{ secrets.GITHUB_TOKEN }}
build-windows:
strategy:
matrix:
@ -65,3 +71,9 @@ jobs: @@ -65,3 +71,9 @@ jobs:
run: |
build/InstallNugets.sh &&
build/RunTests.sh
- uses: MirrorNG/nunit-reporter@v1.0.9
if: always()
with:
path: build/**/TestResult.xml
access-token: ${{ secrets.GITHUB_TOKEN }}

7
build/RunTests.sh

@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
#!/bin/sh
set -e
BUILD_DIR=$(dirname -- $0)
case "$(uname -s)" in
Darwin|Linux)
@ -15,5 +14,7 @@ case "$(uname -s)" in @@ -15,5 +14,7 @@ case "$(uname -s)" in
;;
esac
cp $BUILD_DIR/../deps/NUnit/nunit.framework.* $BUILD_DIR/$ACTION/lib/Release_*/
$MONO $BUILD_DIR/../deps/NUnit.Console-3.9.0/nunit3-console.exe -noresult $BUILD_DIR/$ACTION/lib/Release_*/*Tests*.dll
DIR=$( cd "$( dirname "$0" )" && pwd )
OUT_DIR=$(find $DIR/$ACTION/lib/* -type d -maxdepth 0)
cp $DIR/../deps/NUnit/nunit.framework.* $OUT_DIR
$MONO $DIR/../deps/NUnit.Console-3.9.0/nunit3-console.exe --result=$OUT_DIR/TestResult.xml $OUT_DIR/*Tests*.dll

Loading…
Cancel
Save