Skip to content

Commit 03de5bc

Browse files
CI: remove junit logger (#2351)
1 parent 83284a2 commit 03de5bc

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@ jobs:
2323

2424
- name: Run tests
2525
run: pwsh bin/test.ps1
26-
27-
- name: Create test summary
28-
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86
29-
with:
30-
paths: build/**/results/**/*.xml
31-
if: always()

bin/test.ps1

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,41 +82,32 @@ function Use-ExampleImplementation {
8282
}
8383
}
8484

85-
function Test-ExerciseImplementation($Exercise, $BuildDir, $ConceptExercisesDir, $PracticeExercisesDir, $IsCI) {
85+
function Test-ExerciseImplementation($Exercise, $BuildDir, $ConceptExercisesDir, $PracticeExercisesDir) {
8686
Write-Output "Running tests"
8787

8888
if (-Not $Exercise) {
89-
Invoke-Tests -Path $BuildDir -IsCI $IsCI
89+
Invoke-Tests -Path $BuildDir
9090
}
9191
elseif (Test-Path "${ConceptExercisesDir}/${Exercise}") {
92-
Invoke-Tests -Path "${ConceptExercisesDir}/${Exercise}" -IsCI $IsCI
92+
Invoke-Tests -Path "${ConceptExercisesDir}/${Exercise}"
9393
}
9494
elseif (Test-Path "${PracticeExercisesDir}/${Exercise}") {
95-
Invoke-Tests -Path "${PracticeExercisesDir}/${Exercise}" -IsCI $IsCI
95+
Invoke-Tests -Path "${PracticeExercisesDir}/${Exercise}"
9696
}
9797
else {
9898
throw "Could not find exercise '${Exercise}'"
9999
}
100100
}
101101

102-
function Invoke-Tests($Path, $IsCI) {
103-
if ($IsCI) {
104-
Get-ChildItem -Path $Path -Include "*.csproj" -Recurse | ForEach-Object {
105-
& dotnet add $_.FullName package JunitXml.TestLogger -v 4.1.0
106-
}
107-
& dotnet test $Path --logger "junit;LogFilePath=results/test.xml"
108-
}
109-
else {
110-
& dotnet test $Path
111-
}
102+
function Invoke-Tests($Path) {
103+
& dotnet test $Path
112104
}
113105

114106

115107
$buildDir = "${PSScriptRoot}/build"
116108
$practiceExercisesDir = "${buildDir}/practice"
117109
$conceptExercisesDir = "${buildDir}/concept"
118110
$sourceDir = Resolve-Path "exercises"
119-
$isCi = [System.Convert]::ToBoolean($env:CI)
120111

121112
Clean $buildDir
122113
Copy-Exercise $sourceDir $buildDir
@@ -128,4 +119,4 @@ if (!$Exercise) {
128119
}
129120

130121
Use-ExampleImplementation $conceptExercisesDir $practiceExercisesDir
131-
Test-ExerciseImplementation -Exercise $Exercise -BuildDir $buildDir -ConceptExercisesDir $conceptExercisesDir -PracticeExercisesDir $practiceExercisesDir -IsCI $isCi
122+
Test-ExerciseImplementation -Exercise $Exercise -BuildDir $buildDir -ConceptExercisesDir $conceptExercisesDir -PracticeExercisesDir $practiceExercisesDir

0 commit comments

Comments
 (0)