#!/usr/bin/env bash

set -e

echo "==> Checking sync code is up to date"
uv run ry src tests

echo "==> Checking code style with ruff"
uv run ruff check src tests

echo "==> Checking formatting with ruff"
uv run ruff format --check

echo "==> Type checking with pyright"
uv run --all-extras pyright src tests

echo "==> Testing import without extras"
uv run --with-editable . --no-dev --isolated --script - <<EOF
import zapros
print("Import successful")
EOF
