Skip to content

Commit f5ca8d1

Browse files
committed
chore: Test CI workflow when no test is selected
1 parent f3cbcea commit f5ca8d1

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/scripts/Collect-TestProjects.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ If ($runsOnNotFound) {
2626
}
2727

2828
# Filter projects and output as compressed JSON.
29-
$testProjects | & (Join-Path $PSScriptRoot 'Filter-TestProjects.ps1') | ConvertTo-Json -Compress
29+
$filteredTestProjects = $testProjects | & (Join-Path $PSScriptRoot 'Filter-TestProjects.ps1') | ConvertTo-Json -AsArray -Compress
30+
$filteredTestProjects ?? "[]"

.github/scripts/Filter-TestProjects.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ $XUNIT_MODULES = @(
5252
function Should-RunTests {
5353
param ([string]$ModuleName)
5454

55+
return $false
56+
5557
If ($script:branch -In $PROTECTED_BRANCHES) {
5658
Write-Host "Running '$ModuleName': protected branch '$script:branch'."
5759
return $true

.github/workflows/test-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
name: test-report
3636
path: '**/*.trx'
3737
reporter: dotnet-trx
38-
fail-on-empty: false
3938
only-summary: true
4039
use-actions-summary: false
4140
list-suites: failed
4241
list-tests: failed
42+
fail-on-empty: false

0 commit comments

Comments
 (0)