| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e0b24b9 commit f60fa5c
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,9 @@ | |||
| 2 | 2 | # Run the same checks as .github/workflows/ci.yml locally, in the same order. | |
| 3 | 3 | # Stops at the first failure. If this script is green, CI should be green too. | |
| 4 | 4 | # | |
| 5 | - # Uses uv to manage the project venv and CI dependencies. Install uv first: | ||
| 5 | + # Uses uv to manage the project venv and dev dependencies. `uv sync` creates | ||
| 6 | + # and updates .venv itself, so there is no venv or activation step. Install | ||
| 7 | + # uv first: | ||
| 6 | 8 | # curl -LsSf https://astral.sh/uv/install.sh | sh | |
| 7 | 9 | # | |
| 8 | 10 | # Usage: | |
@@ -20,36 +22,29 @@ if ! command -v uv > /dev/null; then | |||
| 20 | 22 | exit 1 | |
| 21 | 23 | fi | |
| 22 | 24 | ||
| 23 | - if [[ ! -x ".venv/bin/python" ]]; then | ||
| 24 | - printf "\n==> Creating .venv (uv venv --seed)\n" | ||
| 25 | - uv venv --seed | ||
| 26 | - fi | ||
| 27 | - | ||
| 28 | - printf "\n==> Syncing CI dependencies\n" | ||
| 29 | - uv pip install --python .venv/bin/python -e ".[ci]" build | ||
| 30 | - | ||
| 31 | - PY=".venv/bin/python" | ||
| 25 | + printf "\n==> Syncing dependencies (uv sync --locked --group dev)\n" | ||
| 26 | + uv sync --locked --group dev | ||
| 32 | 27 | ||
| 33 | 28 | step() { | |
| 34 | 29 | printf "\n==> %s\n" "$1" | |
| 35 | 30 | } | |
| 36 | 31 | ||
| 37 | 32 | step "Lint (Ruff)" | |
| 38 | - "$PY" -m ruff check . | ||
| 33 | + uv run ruff check . | ||
| 39 | 34 | ||
| 40 | 35 | step "Format check (Black)" | |
| 41 | - "$PY" -m black --check src examples tests | ||
| 36 | + uv run black --check src examples tests | ||
| 42 | 37 | ||
| 43 | 38 | step "Type check (MyPy)" | |
| 44 | - "$PY" -m mypy --install-types --non-interactive | ||
| 39 | + uv run mypy | ||
| 45 | 40 | ||
| 46 | 41 | step "Build package (sdist + wheel)" | |
| 47 | - "$PY" -m build | ||
| 42 | + uv build | ||
| 48 | 43 | ||
| 49 | 44 | step "Run tests (pytest)" | |
| 50 | - "$PY" -m pytest -q | ||
| 45 | + uv run pytest -q | ||
| 51 | 46 | ||
| 52 | 47 | step "Check E2E coverage" | |
| 53 | - "$PY" scripts/check-e2e-coverage.py | ||
| 48 | + uv run scripts/check-e2e-coverage.py | ||
| 54 | 49 | ||
| 55 | 50 | printf "\nAll CI checks passed.\n" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ | |||
| 26 | 26 | # .github/workflows/e2e.yml and tests/e2e/AGENTS.md. | |
| 27 | 27 | # | |
| 28 | 28 | # Prerequisites: | |
| 29 | - # - `pn` CLI available (e.g. via `pip install -e .`). | ||
| 29 | + # - `pn` CLI available (e.g. via `uv sync`, then run through `uv run`). | ||
| 30 | 30 | # - `maestro` CLI on PATH (https://maestro.dev/). | |
| 31 | 31 | # - For Android: an emulator running. | |
| 32 | 32 | # - For iOS: a simulator running. | |
@@ -64,7 +64,8 @@ case "$PLATFORM" in | |||
| 64 | 64 | esac | |
| 65 | 65 | ||
| 66 | 66 | if ! command -v pn > /dev/null; then | |
| 67 | - echo "Error: 'pn' CLI not found on PATH. Install via 'pip install -e .'" >&2 | ||
| 67 | + echo "Error: 'pn' CLI not found on PATH. Run 'uv sync', then invoke this" >&2 | ||
| 68 | + echo "script through 'uv run ./scripts/run-e2e.sh ...'." >&2 | ||
| 68 | 69 | exit 2 | |
| 69 | 70 | fi | |
| 70 | 71 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments