44 - id : resolver-unit-tests
55 name : Resolver unit tests
66 language : system
7- entry : bash -lc 'python -m pytest -q'
7+ entry : >-
8+ bash -lc 'R="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")";
9+ cd "$R" || exit 1;
10+ P=""; for c in "$PWD/.venv/bin/python" "$PWD/venv/bin/python" "$(command -v python3)" "$(command -v python)"; do
11+ [[ -n "$c" && -x "$c" ]] || continue;
12+ "$c" -c "import pytest" 2>/dev/null && { P="$c"; break; }; done;
13+ [[ -n "$P" ]] || { echo "error: no Python with pytest; use .venv and pip install -e .[dev]" >&2; exit 1; };
14+ "$P" -m pytest -q'
815 pass_filenames : false
916 files : \.py$
1017 exclude : (^|/)tests/
@@ -14,13 +21,14 @@ repos:
1421 name : Resolver mypy
1522 language : system
1623 entry : >-
17- bash -lc 'APP_ENV=development
18- ENVIRONMENT=development
19- RESOLVER_DATABASE_URL=postgresql://ci_user:ci_password_123@localhost:5432/resolver
20- RESOLVER_EXPECTED_SERVICE_TOKEN=ci_resolver_expected_service_token_123456789
21- RESOLVER_CONTEXT_VERIFY_KEY=ci_resolver_context_verify_key_12345678901234567890
22- PYTHONPATH=$PWD
23- mypy --config-file "$PWD/pyproject.toml" "$@"' --
24+ bash -lc 'R="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")";
25+ cd "$R" || exit 1;
26+ P=""; for c in "$PWD/.venv/bin/python" "$PWD/venv/bin/python" "$(command -v python3)" "$(command -v python)"; do
27+ [[ -n "$c" && -x "$c" ]] || continue;
28+ "$c" -c "import mypy, numpy, sqlalchemy, pydantic, httpx" 2>/dev/null && { P="$c"; break; }; done;
29+ [[ -n "$P" ]] || { echo "error: no Python with mypy + resolver deps; pip install -e .[dev] in resolver/" >&2; exit 1; };
30+ APP_ENV=development ENVIRONMENT=development RESOLVER_DATABASE_URL=postgresql://ci_user:ci_password_123@localhost:5432/resolver RESOLVER_EXPECTED_SERVICE_TOKEN=ci_resolver_expected_service_token_123456789 RESOLVER_CONTEXT_VERIFY_KEY=ci_resolver_context_verify_key_12345678901234567890 PYTHONPATH="$PWD" "$P" -m mypy --python-executable "$P" --cache-dir /tmp/resolver-mypy-cache --config-file "$PWD/pyproject.toml" .'
31+ pass_filenames : false
2432 files : \.py$
2533 exclude : (^|/)tests/
2634 types : [python]
@@ -29,13 +37,14 @@ repos:
2937 name : Resolver pylint
3038 language : system
3139 entry : >-
32- bash -lc 'APP_ENV=development
33- ENVIRONMENT=development
34- RESOLVER_DATABASE_URL=postgresql://ci_user:ci_password_123@localhost:5432/resolver
35- RESOLVER_EXPECTED_SERVICE_TOKEN=ci_resolver_expected_service_token_123456789
36- RESOLVER_CONTEXT_VERIFY_KEY=ci_resolver_context_verify_key_12345678901234567890
37- PYTHONPATH=$PWD
38- pylint --rcfile "$PWD/pyproject.toml" "$@"' --
40+ bash -lc 'R="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")";
41+ cd "$R" || exit 1;
42+ P=""; for c in "$PWD/.venv/bin/python" "$PWD/venv/bin/python" "$(command -v python3)" "$(command -v python)"; do
43+ [[ -n "$c" && -x "$c" ]] || continue;
44+ "$c" -c "import pylint, numpy, sqlalchemy, pydantic, httpx" 2>/dev/null && { P="$c"; break; }; done;
45+ [[ -n "$P" ]] || { echo "error: no Python with pylint + resolver deps; pip install -e .[dev] in resolver/" >&2; exit 1; };
46+ APP_ENV=development ENVIRONMENT=development RESOLVER_DATABASE_URL=postgresql://ci_user:ci_password_123@localhost:5432/resolver RESOLVER_EXPECTED_SERVICE_TOKEN=ci_resolver_expected_service_token_123456789 RESOLVER_CONTEXT_VERIFY_KEY=ci_resolver_context_verify_key_12345678901234567890 PYTHONPATH="$PWD" "$P" -m pylint --rcfile "$PWD/pyproject.toml" .'
47+ pass_filenames : false
3948 files : \.py$
4049 exclude : (^|/)tests/
4150 types : [python]
0 commit comments