feature(ci): add testing and coverage data to gitlab ci artifacts

This commit is contained in:
Levente Polyak
2021-11-01 18:36:02 +01:00
parent b9bbe3f1d4
commit c807a81a57
3 changed files with 14 additions and 6 deletions

View File

@ -15,8 +15,9 @@ lint:
changes: changes:
- keyringctl - keyringctl
- libkeyringctl/* - libkeyringctl/*
- test/* - tests/*
- .gitlab-ci.yml - .gitlab-ci.yml
- Makefile
test: test:
stage: test stage: test
@ -29,8 +30,14 @@ test:
changes: changes:
- keyringctl - keyringctl
- libkeyringctl/* - libkeyringctl/*
- test/* - tests/*
- .gitlab-ci.yml - .gitlab-ci.yml
- Makefile
artifacts:
when: always
reports:
junit: build/junit-report.xml
cobertura: build/coverage.xml
build_install: build_install:
stage: test stage: test

View File

@ -5,10 +5,10 @@ KEYRING_FILES=$(wildcard build/*.gpg) $(wildcard build/*-revoked) $(wildcard bui
all: build all: build
lint: lint:
black --check --diff keyringctl libkeyringctl black --check --diff keyringctl libkeyringctl tests
isort --diff . isort --diff .
flake8 keyringctl libkeyringctl flake8 keyringctl libkeyringctl tests
mypy --install-types --non-interactive keyringctl libkeyringctl mypy --install-types --non-interactive keyringctl libkeyringctl tests
fmt: fmt:
black . black .
@ -17,6 +17,7 @@ fmt:
test: test:
coverage run coverage run
coverage report coverage report
coverage xml -o build/coverage.xml
build: build:
./keyringctl -v build ./keyringctl -v build

View File

@ -27,7 +27,7 @@ show_missing = true
[tool.coverage.run] [tool.coverage.run]
branch = true branch = true
command_line = "-m pytest -vv tests/" command_line = "-m pytest --junit-xml=build/junit-report.xml -vv tests/"
omit = ["tests/*", ".tox/*"] omit = ["tests/*", ".tox/*"]
[tool.isort] [tool.isort]