Files
topologyviewer/.gitlab-ci.yml
Tucker Polomik 0029f456c6 .gitlab-ci.yml: freeze Python image version at 3.9
Bump to 3.12 in python:latest causes some distutils dependency issues
that are yet to be resolved in the upstream image.

See: https://github.com/pypa/setuptools/issues/3661 for more
information.

Signed-off-by: Tucker Polomik <t.polomik@cablelabs.com>
2023-10-31 13:32:23 -06:00

47 lines
847 B
YAML

image: python:3.9
variables:
pip3_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip3
- venv/
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "web"'
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script:
- python3 --version
- pip3 install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip3 install -r requirements.txt
- pip3 install pylint
stages:
- static_analysis
- tests
pylint:
stage: static_analysis
script:
# ignore C0301 -- "Line too long"
pylint -d C0301 *.py > pylint_output.txt
artifacts:
paths:
- pylint_output.txt
when: always
unit_tests:
stage: tests
script:
- echo "Running unit tests"
- python3 -m unittest