FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

build(scripts): run check.sh through uv sync and uv run · pythonnative/pythonnative@f60fa5c · GitHub

Repository navigation

Commit f60fa5c

Browse files
build(scripts): run check.sh through uv sync and uv run
1 parent e0b24b9 commit f60fa5c

2 files changed

Lines changed: 14 additions & 18 deletions

File tree

‎scripts/check.sh‎

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Run the same checks as .github/workflows/ci.yml locally, in the same order.
33
# Stops at the first failure. If this script is green, CI should be green too.
44
#
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:
68
# curl -LsSf https://astral.sh/uv/install.sh | sh
79
#
810
# Usage:
@@ -20,36 +22,29 @@ if ! command -v uv > /dev/null; then
2022
exit 1
2123
fi
2224

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
3227

3328
step() {
3429
printf "\n==> %s\n" "$1"
3530
}
3631

3732
step "Lint (Ruff)"
38-
"$PY" -m ruff check .
33+
uv run ruff check .
3934

4035
step "Format check (Black)"
41-
"$PY" -m black --check src examples tests
36+
uv run black --check src examples tests
4237

4338
step "Type check (MyPy)"
44-
"$PY" -m mypy --install-types --non-interactive
39+
uv run mypy
4540

4641
step "Build package (sdist + wheel)"
47-
"$PY" -m build
42+
uv build
4843

4944
step "Run tests (pytest)"
50-
"$PY" -m pytest -q
45+
uv run pytest -q
5146

5247
step "Check E2E coverage"
53-
"$PY" scripts/check-e2e-coverage.py
48+
uv run scripts/check-e2e-coverage.py
5449

5550
printf "\nAll CI checks passed.\n"

‎scripts/run-e2e.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# .github/workflows/e2e.yml and tests/e2e/AGENTS.md.
2727
#
2828
# 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`).
3030
# - `maestro` CLI on PATH (https://maestro.dev/).
3131
# - For Android: an emulator running.
3232
# - For iOS: a simulator running.
@@ -64,7 +64,8 @@ case "$PLATFORM" in
6464
esac
6565

6666
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
6869
exit 2
6970
fi
7071

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL