| 1 | + | image: python:latest |
| 2 | + | |
| 3 | + | variables: |
| 4 | + | PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" |
| 5 | + | |
| 6 | + | cache: |
| 7 | + | paths: |
| 8 | + | - .cache/pip |
| 9 | + | - venv/ |
| 10 | + | |
| 11 | + | before_script: |
| 12 | + | - python -V |
| 13 | + | - pip install virtualenv |
| 14 | + | - virtualenv venv |
| 15 | + | - source venv/bin/activate |
| 16 | + | |
| 17 | + | test: |
| 18 | + | script: |
| 19 | + | - pip install pytest |
| 20 | + | - python -m pytest tests -v |
| 21 | + | |