123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- stages:
- - build
- - test
- - deploy
- webui:
- stage: build
- image: node:14
- cache:
- paths:
- - webui/node_modules/
- before_script:
- - cd webui/
- - npm install
- script:
- - npm run build
- artifacts:
- expire_in: 1 day
- paths:
- - webui/dist/
- .python_test_template: &python_test_definition
- variables:
- PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
- cache:
- key: "$CI_JOB_NAME"
- paths:
- - .cache/pip
- - env/
- before_script:
- - python -V
- - python -m venv env
- - source env/bin/activate
- - pip install numpy opencv-python Pillow scipy
- - pip install eventlet flask python-socketio
- - pip install coverage pylint
- script:
- - coverage run --source=pycs/ -m unittest discover test/
- - "pylint --fail-under=9.5
- --disable=duplicate-code
- --disable=missing-module-docstring
- --disable=too-many-instance-attributes
- --extension-pkg-whitelist=cv2
- --module-rgx='^[A-Za-z0-9]+$' --class-rgx='^[A-Za-z0-9]+$'
- app.py pycs"
- tests_3.6:
- stage: test
- image: python:3.6
- only:
- - master
- <<: *python_test_definition
- tests_3.7:
- stage: test
- image: python:3.7
- only:
- - master
- <<: *python_test_definition
- tests_3.8:
- stage: test
- image: python:3.8
- only:
- - master
- <<: *python_test_definition
- tests_3.9:
- stage: test
- image: python:3.9
- <<: *python_test_definition
- after_script:
- - source env/bin/activate
- - coverage report -m
- tests_3.10:
- stage: test
- image: python:3.10-rc
- allow_failure: true
- only:
- - master
- <<: *python_test_definition
- bundle:
- stage: deploy
- image: alpine
- script:
- - mv webui/dist dist
- - rm -rf webui
- - mv dist webui
- artifacts:
- expire_in: 30 days
- paths:
- - settings.json
- - app.py
- - pycs/
- - webui/
- - labels
- - models
|