mirror of https://github.com/stijndcl/didier
Add codecov
parent
60382b8eab
commit
9d04d62b1c
|
@ -54,7 +54,11 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip3 install -r requirements.txt -r requirements-dev.txt
|
run: pip3 install -r requirements.txt -r requirements-dev.txt
|
||||||
- name: Run Pytest
|
- 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:
|
linting:
|
||||||
needs: [dependencies]
|
needs: [dependencies]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -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
|
|
@ -1,6 +1,23 @@
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 120
|
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]
|
[tool.mypy]
|
||||||
plugins = [
|
plugins = [
|
||||||
"sqlalchemy.ext.mypy.plugin"
|
"sqlalchemy.ext.mypy.plugin"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
black==22.3.0
|
black==22.3.0
|
||||||
|
coverage[toml]==6.4.1
|
||||||
mypy==0.961
|
mypy==0.961
|
||||||
pylint==2.14.1
|
pylint==2.14.1
|
||||||
pytest==7.1.2
|
pytest==7.1.2
|
||||||
|
|
Loading…
Reference in New Issue