Add vscode task code coverage (#53783)

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
Michael 2021-08-05 11:46:21 +02:00 committed by GitHub
parent dd479d410a
commit 29e604bd22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

22
.vscode/tasks.json vendored
View File

@ -60,6 +60,21 @@
},
"problemMatcher": []
},
{
"label": "Code Coverage",
"detail": "Generate code coverage report for a given integration.",
"type": "shell",
"command": "pytest ./tests/components/${input:integrationName}/ --cov=homeassistant.components.${input:integrationName} --cov-report term-missing",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Generate Requirements",
"type": "shell",
@ -102,5 +117,12 @@
},
"problemMatcher": []
}
],
"inputs": [
{
"id": "integrationName",
"type": "promptString",
"description": "For which integration should the task run?"
}
]
}