Add GitLab CI to run tests on push

This commit is contained in:
Russell Ballestrini 2025-12-22 20:18:43 -05:00
parent bc11c516b6
commit f8a1cf6730

25
.gitlab-ci.yml Normal file
View file

@ -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"