Skip to content

Commit 657987d

Browse files
committed
make sure CI doesnt mistakenly hide shell test failures
1 parent 2d95b2f commit 657987d

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

justfile

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,41 +264,55 @@ list-missed-tests: install log-tests test-all
264264
[script("bash")]
265265
test-bash:
266266
uv sync --all-extras
267-
source .venv/bin/activate && pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_bash tests/test_parser_completers.py tests/shellcompletion/test_bash.py
267+
source .venv/bin/activate
268+
pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_bash tests/test_parser_completers.py tests/shellcompletion/test_bash.py || exit
268269
uv sync --no-extra rich
269-
source .venv/bin/activate && pytest --cov-append tests/shellcompletion/test_bash.py::BashExeTests::test_prompt_install
270+
source .venv/bin/activate
271+
pytest --cov-append tests/shellcompletion/test_bash.py::BashExeTests::test_prompt_install || exit
270272

271273
# test zsh shell completions
272274
[script("zsh")]
273275
test-zsh:
274276
uv sync --all-extras
275-
source .venv/bin/activate && pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_zsh tests/test_parser_completers.py tests/shellcompletion/test_zsh.py
277+
source .venv/bin/activate
278+
pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_zsh tests/test_parser_completers.py tests/shellcompletion/test_zsh.py || exit
276279
uv sync --no-extra rich
277-
source .venv/bin/activate && pytest --cov-append tests/shellcompletion/test_zsh.py::ZshExeTests::test_prompt_install
280+
source .venv/bin/activate
281+
pytest --cov-append tests/shellcompletion/test_zsh.py::ZshExeTests::test_prompt_install || exit
278282

279283
# test powershell shell completions
280284
[script("powershell")]
281285
test-powershell:
282286
uv sync --no-extra rich
283-
. .venv/Scripts/activate.ps1; pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_powershell tests/test_parser_completers.py tests/test_parser_completers.py tests/shellcompletion/test_powershell.py::PowerShellTests tests/shellcompletion/test_powershell.py::PowerShellExeTests; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
287+
. .venv/Scripts/activate.ps1
288+
pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_powershell tests/test_parser_completers.py tests/test_parser_completers.py tests/shellcompletion/test_powershell.py::PowerShellTests tests/shellcompletion/test_powershell.py::PowerShellExeTests
289+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
284290
uv sync --no-extra rich
285-
. .venv/Scripts/activate.ps1; pytest --cov-append tests/shellcompletion/test_powershell.py::PowerShellExeTests::test_prompt_install; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
291+
. .venv/Scripts/activate.ps1
292+
pytest --cov-append tests/shellcompletion/test_powershell.py::PowerShellExeTests::test_prompt_install
293+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
286294

287295
# test pwsh shell completions
288296
[script("pwsh")]
289297
test-pwsh:
290298
uv sync --all-extras
291-
. .venv/Scripts/activate.ps1; pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_pwsh tests/test_parser_completers.py tests/shellcompletion/test_powershell.py::PWSHTests tests/shellcompletion/test_powershell.py::PWSHExeTests; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
299+
. .venv/Scripts/activate.ps1
300+
pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_pwsh tests/test_parser_completers.py tests/shellcompletion/test_powershell.py::PWSHTests tests/shellcompletion/test_powershell.py::PWSHExeTests
301+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
292302
uv sync --no-extra rich
293-
. .venv/Scripts/activate.ps1; pytest --cov-append tests/shellcompletion/test_powershell.py::PWSHExeTests::test_prompt_install; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
303+
. .venv/Scripts/activate.ps1
304+
pytest --cov-append tests/shellcompletion/test_powershell.py::PWSHExeTests::test_prompt_install
305+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
294306

295307
# test fish shell completions
296308
[script("fish")]
297309
test-fish:
298310
uv sync --all-extras
299-
source .venv/bin/activate.fish && pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_fish tests/test_parser_completers.py tests/shellcompletion/test_fish.py
311+
source .venv/bin/activate.fish
312+
pytest --cov-append tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_fish tests/test_parser_completers.py tests/shellcompletion/test_fish.py || exit
300313
uv sync --no-extra rich
301-
source .venv/bin/activate.fish && pytest --cov-append tests/shellcompletion/test_fish.py::FishExeShellTests::test_prompt_install
314+
source .venv/bin/activate.fish
315+
pytest --cov-append tests/shellcompletion/test_fish.py::FishExeShellTests::test_prompt_install || exit
302316

303317
# run tests
304318
test *TESTS:

0 commit comments

Comments
 (0)