Skip to content

Commit

Permalink
Publish the unit test results from the CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Numpsy committed Sep 29, 2024
1 parent c40f2a0 commit 9cfaef0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ jobs:
with:
name: fake-artifacts-${{ matrix.os }}
path: release/artifacts
- name: publish test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: testresults
4 changes: 3 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,10 @@ let callPaket wd args =
/// <param name="dllPath">Test assembly to run tests from</param>
/// <param name="resultsXml">Expecto test results XML file</param>
let runExpecto workDir dllPath resultsXml =
let resultsFile = "testresults" </> resultsXml

let processResult =
DotNet.exec (dotnetWorkingDir workDir) (sprintf "%s" dllPath) (sprintf "--nunit-summary %s" resultsXml)
DotNet.exec (dotnetWorkingDir workDir) (sprintf "%s" dllPath) (sprintf "--nunit-summary %s" resultsFile)

if processResult.ExitCode <> 0 then
failwithf "Tests in %s failed." (Path.GetFileName dllPath)
Expand Down

0 comments on commit 9cfaef0

Please sign in to comment.