Skip to content

Commit 135669c

Browse files
committed
Run pytest suite in zsh as part of CI
1 parent fa6041a commit 135669c

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/run_tests.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,34 @@ jobs:
2323
uses: actions/setup-python@v3
2424
with:
2525
python-version: "3.10"
26+
27+
- name: Install zsh
28+
run: sudo apt-get update; sudo apt-get install -y zsh
29+
2630
- name: Install dependencies
2731
run: |
2832
python3.10 -m venv .venv --prompt="venv-cli"
2933
. .venv/bin/activate
3034
python -m pip install --require-virtualenv --upgrade pip
3135
python -m pip install --require-virtualenv -r dev-requirements.txt
36+
3237
- name: Check linting/formatting
3338
run: |
3439
. .venv/bin/activate
3540
python -m isort --check .
3641
python -m black --config pyproject.toml --check .
3742
python -m mypy --config-file pyproject.toml
38-
- name: Test with pytest
43+
44+
- name: Test with pytest (bash)
45+
run: |
46+
export SHELL="/usr/bin/bash"
47+
. .venv/bin/activate
48+
python -m pytest -n auto .
49+
shell: /usr/bin/bash -e {0}
50+
51+
- name: Test with pytest (zsh)
3952
run: |
53+
export SHELL="/usr/bin/zsh"
4054
. .venv/bin/activate
4155
python -m pytest -n auto .
56+
shell: /usr/bin/zsh -e {0}

tests/helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import subprocess
23
import sys
34
from pathlib import Path
@@ -8,7 +9,7 @@
89

910

1011
def _command_setup(venv_cli_path: Path, activate: bool = False) -> list[str]:
11-
bash = ["/bin/bash", "-c"]
12+
bash = [os.environ["SHELL"], "-c"]
1213
source_command = f". {venv_cli_path}"
1314

1415
additional_commands: list[str] = []

0 commit comments

Comments
 (0)