I'm new to Gitlab, trying to setup coverage report -m for Gitlab. When I run manually, coverage report -m gives me the report. Just cant figure out what needs to be done to get that display on Gitlab.
This needs to run with Python 3.6 unit test code coverage on Linux for Gitlab.
Here is my yml file
stages:
- build
- test
- coverage
- deploy
before_script:
- python --version
- pip install -r requirements.txt
unit-tests:
image:
name: "python:3.6"
entrypoint: [""]
stage: test
script: python3 -m unittest discover
test:
image:
name: "python:3.6"
stage: test
script:
- PYTHONPATH=$(pwd) python3 my_Project_Lib/my_test_scripts/runner.py
coverage:
stage: test
script:
#- docker pull $CONTAINER_TEST_IMAGE
- python3 -m unittest discover
#- docker run $CONTAINER_TEST_IMAGE /bin/bash -c "python -m coverage run tests/tests.py && python -m coverage report -m"
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
This runs my unit tests and runer.pl fine, but no test coverage data.