Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions action.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $inputs = @{
trx_xsl_path = Get-ActionInput trx_xsl_path
extra_test_parameters = Get-ActionInput extra_test_parameters
fail_build_on_failed_tests = Get-ActionInput fail_build_on_failed_tests
inline_run_settings = Get-ActionInput inline_run_settings
}

$tmpDir = [System.IO.Path]::Combine($PWD, '_TMP')
Expand Down Expand Up @@ -315,6 +316,12 @@ else {
$dotnetArgs += $inputs.project_path
}

# any inline runsettings must be provided after a -- token to separate from other settings
if ($inputs.inline_run_settings) {
$dotnetArgs += '--'
$dotnetArgs += $inputs.inline_run_settings
}

Write-ActionInfo "Assembled test invocation arguments:"
Write-ActionInfo " $dotnetArgs"

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ inputs:
description: |
If set to true, the build will fail if at least one test fails

inline_run_settings:
description: |
A space-delimited list of key=value pairs corresponding to runsettings for the tests.
See https://github.com/Microsoft/vstest-docs/blob/main/docs/RunSettingsArguments.md for more details.
required: false


## Here you describe your *formal* outputs.
outputs:
Expand Down