diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1d1e0c3 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +stages: + - test + +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +cache: + paths: + - .cache/pip + - .venv/ + +test: + stage: test + image: python:3.11 + before_script: + - python -m venv .venv + - source .venv/bin/activate + - pip install --upgrade pip + - pip install pytest pytest-asyncio aiofiles aiohttp + script: + - source .venv/bin/activate + - pytest tests/ -v --tb=short + rules: + - if: $CI_PIPELINE_SOURCE == "push" + - if: $CI_PIPELINE_SOURCE == "merge_request_event"