Skip to content

Commit 150cbd9

Browse files
committed
fix #194
1 parent 39e7ba1 commit 150cbd9

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -658,15 +658,17 @@ jobs:
658658
shell: powershell
659659
- name: Run Powershell Tab Completion Tests
660660
run: |
661-
just test ./tests/verify_environment.py
661+
just test ./tests/verify_environment.py; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
662662
.venv\Scripts\activate.ps1; cmd /c "pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_powershell"; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
663-
just test-powershell
664-
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
663+
just test-powershell; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
665664
shell: powershell
666665
- name: Test CMD shell failure
667666
run: |
668667
call .venv\Scripts\activate
669-
pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::test_get_win_shell_failure
668+
pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::test_get_win_shell_failure || exit 1
669+
Rename-Item -Path "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NewName "powershell_disabled.exe" -Force
670+
Rename-Item -Path "C:\Program Files\PowerShell\7\pwsh.exe" -NewName "pwsh_disabled.exe" -Force
671+
pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::test_get_win_shell_failure || exit 1
670672
shell: cmd
671673
- name: Store coverage files
672674
uses: actions/upload-artifact@v4
@@ -729,9 +731,8 @@ jobs:
729731
run: |
730732
just test ./tests/verify_environment.py
731733
.venv\Scripts\activate.ps1; cmd /c "pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_pwsh"; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
732-
just test-pwsh
733-
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
734-
shell: powershell
734+
just test-pwsh; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
735+
shell: pwsh
735736
- name: Test CMD shell failure
736737
run: |
737738
call .venv\Scripts\activate

doc/source/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Change Log
77
v3.1.0 (2024-03-xx)
88
===================
99

10+
* Fixed `Shell completion tests let failures through in CI <https://github.com/django-commons/django-typer/issues/194>`_
1011
* Fixed `fish completion installs should respect XDG_CONFIG_HOME <https://github.com/django-commons/django-typer/issues/193>`_
1112
* Fixed `zsh completion installs should respect ZDOTDIR <https://github.com/django-commons/django-typer/issues/192>`_
1213
* Implemented `Support Django 5.2 <https://github.com/django-commons/django-typer/issues/188>`_

0 commit comments

Comments
 (0)