test: add coverage

This commit is contained in:
chingning.chen 2022-04-28 21:59:25 +08:00 committed by EricWu
parent b135e1b950
commit d368a79bf8

View File

@ -1,28 +1,29 @@
stages: stages:
- lint - init
- test - test
linting: lint:
stage: lint stage: init
script: script:
- flake8 - flake8
- interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 50 mmseg - interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 50 mmseg
building: build:
stage: test stage: init
script: script:
- python setup.py check -m -s - python setup.py check -m -s
- python -m pip install -e . - python -m pip install -e .
mmseg-testing: unit-test:
stage: test stage: test
script: script:
- python -m coverage run --branch --source mmseg -m pytest tests/ - python -m coverage run --branch --source mmseg -m pytest tests/
- python -m coverage xml - python -m coverage xml
- python -m coverage report -m - python -m coverage report -m
coverage: '/TOTAL.*\s([.\d]+)%/'
kneron-testing: integration-test:
stage: test stage: test
script: script:
- echo "[WIP] This job test kneron-related functions." - echo "[WIP] This job examines integration tests (typically Kneron's)."