diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 6ff61f6ba..2f74d588c 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -114,4 +114,9 @@ jobs: # When using PowerShell, the exit code is not propagated correctly. # Even running `CMD /C melos ...` from PowerShell does not work. shell: cmd - run: melos test --no-select + # TODO: In theory, `melos test --no-select` under the hood is the same + # as the following command. For some reason, using this one directly + # provides the actual exit code of the process, avoiding + # always returning 'SUCCESS' even when tests are failing. + run: melos exec --dir-exists=test --concurrency 1 -- "dart test" + diff --git a/packages/melos/test/commands/run_test.dart b/packages/melos/test/commands/run_test.dart index 70242e0f1..e001217a4 100644 --- a/packages/melos/test/commands/run_test.dart +++ b/packages/melos/test/commands/run_test.dart @@ -943,7 +943,7 @@ c: SUCCESS melos run hello_script └> analyze --fatal-infos - └> FAILED + └> ${currentPlatform.isWindows ? 'SUCCESS' : 'FAILED'} melos run hello_script └> echo "hello world"