stages: - test variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" cache: paths: - .cache/pip - .venv/ test: stage: test tags: - build image: python:3.11 before_script: - python3 -m venv .venv - source .venv/bin/activate - pip install --upgrade pip # Supply-chain: hash-verified, pinned deps (see requirements.lock / make pins-lock) - pip install --require-hashes -r requirements.lock - pip install pytest pytest-asyncio httpx script: - source .venv/bin/activate - python3 -m pytest tests/ -v --tb=short rules: - if: $CI_PIPELINE_SOURCE == "push" - if: $CI_PIPELINE_SOURCE == "merge_request_event"