Skip to content

Commit e7ebabc

Browse files
ci: install zsh for shell documentation checks
1 parent 53c77ca commit e7ebabc

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

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

2424
- name: Install dependencies
2525
run: |
26+
sudo apt-get update
27+
sudo apt-get install --no-install-recommends -y zsh
2628
python -m pip install --upgrade pip
2729
pip install -r requirements.txt
2830
pip install fastapi uvicorn

‎scripts/check_zsh_extras.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
import re
7+
import shutil
78
import subprocess
89
import sys
910
from pathlib import Path
@@ -67,6 +68,8 @@ def _run_zsh(args: list[str], script: str) -> subprocess.CompletedProcess[str]:
6768

6869

6970
def _check_zsh() -> list[str]:
71+
if shutil.which("zsh") is None:
72+
return ["zsh executable not found; install zsh before running this check"]
7073
syntax = "pip install '.[web]'\npip install '.[all]'\n"
7174
parsed = _run_zsh(["-n"], syntax)
7275
if parsed.returncode:

0 commit comments

Comments
 (0)