Add codecov

pull/115/head
stijndcl 2022-07-01 14:25:15 +02:00
parent 60382b8eab
commit 9d04d62b1c
4 changed files with 37 additions and 1 deletions

View File

@ -54,7 +54,11 @@ jobs:
- name: Install dependencies
run: pip3 install -r requirements.txt -r requirements-dev.txt
- name: Run Pytest
run: pytest tests
run: |
coverage run -m pytest
coverage xml
- name: Upload coverage report to CodeCov
uses: codecov/codecov-action@v3
linting:
needs: [dependencies]
runs-on: ubuntu-latest

14
codecov.yaml 100644
View File

@ -0,0 +1,14 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
coverage:
round: down
precision: 5
ignore:
- "./tests/*"
- "./didier/cogs/*" # Cogs can't really be tested properly

View File

@ -1,6 +1,23 @@
[tool.black]
line-length = 120
[tool.coverage.run]
concurrency = [
"greenlet"
]
source = [
"didier",
"database"
]
omit = [
"./tests/*",
"./database/migrations.py",
"./didier/cogs/*",
"./didier/didier.py",
"./didier/data/flags/*",
"./didier/data/modals/*"
]
[tool.mypy]
plugins = [
"sqlalchemy.ext.mypy.plugin"

View File

@ -1,4 +1,5 @@
black==22.3.0
coverage[toml]==6.4.1
mypy==0.961
pylint==2.14.1
pytest==7.1.2