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
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
3 changed files with 14 additions and 6 deletions

View File

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

View File

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

View File

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