Skip to content

Conversation

@Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Sep 29, 2024

Based on comments in #2818 - publish the unit test results files during CI builds, and then publish a test report using https://github.com/EnricoMi/publish-unit-test-result-action.

This first attempt is based on the action documentation, and on some implementations in other repositories (This is the first time I've used it myself)

Note: It appears that Github won't pick up the new publish-test-results action until the yaml file for it is in the master branch, so I've had to merge a test change into the master branch in my fork to test it - you can see the results for that at https://github.com/Numpsy/FAKE/runs/30818769728 which looks reasonable.

Not sure if it'll need tuning to control where the test results get pushed to - e.g. if they get displayed inline inside pull requests as well as in the build results page.

/// <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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it stands, the test result xml files get written into the root directory of the repository, but it's easier to upload them in a batch if they all get written into a subdirectory and this looked like the easiest place to change to do that

@xperiandri xperiandri merged commit 6f2fc43 into fsprojects:master Sep 30, 2024
4 checks passed
@Numpsy Numpsy deleted the publish_test branch September 30, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants