From f8a1cf673029f728ab5a58f2f03ea958bb1ac1ce Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 22 Dec 2025 20:18:43 -0500 Subject: [PATCH] Add GitLab CI to run tests on push --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml 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"