Skip to content

Commit

Permalink
feature(ci): add testing and coverage data to gitlab ci artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
anthraxx committed Nov 29, 2021
1 parent d4fbcc4 commit d62af88
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ lint:
changes:
- keyringctl
- libkeyringctl/*
- test/*
- tests/*
- .gitlab-ci.yml
- Makefile

test:
stage: test
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand All @@ -17,6 +17,7 @@ fmt:
test:
coverage run
coverage report
coverage xml -o build/coverage.xml

build:
./keyringctl -v build
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit d62af88

Please sign in to comment.