Skip to content

Commit 60dff7d

Browse files
committed
ci: run unit tests and smoke tests in CI
Previously the CI was only testing CLI invocation but not running pytest. Changes: - Install dev dependencies (pytest, mypy, ruff) in test jobs - Run unit tests with: pytest tests/ -v -m 'not smoke' - Run smoke tests with: pytest tests/smoke/ -v - Both 'test' and 'test-npx-fallback' jobs now run full test suite This ensures: ✅ Unit tests run on all platforms (ubuntu, windows) and Python versions (3.9, 3.13) ✅ Smoke tests verify end-to-end CLI functionality ✅ Both global install and npx fallback paths are tested
1 parent 910f7c4 commit 60dff7d

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,14 @@ jobs:
126126
- name: Pin Python version
127127
run: uv python pin ${{ matrix.python-version }}
128128

129-
- name: Install package
130-
run: uv sync
129+
- name: Install package with dev dependencies
130+
run: uv sync --extra dev
131+
132+
- name: Run unit tests
133+
run: uv run pytest tests/ -v -m 'not smoke'
134+
135+
- name: Run smoke tests
136+
run: uv run pytest tests/smoke/ -v
131137

132138
- name: Test CLI can be invoked
133139
run: uv run promptfoo --version
@@ -192,8 +198,14 @@ jobs:
192198
- name: Pin Python version
193199
run: uv python pin ${{ matrix.python-version }}
194200

195-
- name: Install package
196-
run: uv sync
201+
- name: Install package with dev dependencies
202+
run: uv sync --extra dev
203+
204+
- name: Run unit tests
205+
run: uv run pytest tests/ -v -m 'not smoke'
206+
207+
- name: Run smoke tests (with npx fallback)
208+
run: uv run pytest tests/smoke/ -v
197209

198210
- name: Test CLI fallback to npx (no global install)
199211
run: uv run promptfoo --version

0 commit comments

Comments
 (0)