Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vscode task code coverage #53783

Merged
merged 2 commits into from
Aug 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@
},
"problemMatcher": []
},
{
"label": "Code Coverage",
"detail": "Generate code coverage report for given component.",
mib1185 marked this conversation as resolved.
Show resolved Hide resolved
"type": "shell",
"command": "pytest ./tests/components/${input:componentName}/ --cov=homeassistant.components.${input:componentName} --cov-report term-missing",
mib1185 marked this conversation as resolved.
Show resolved Hide resolved
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Generate Requirements",
"type": "shell",
Expand Down Expand Up @@ -102,5 +117,12 @@
},
"problemMatcher": []
}
],
"inputs": [
{
"id": "componentName",
mib1185 marked this conversation as resolved.
Show resolved Hide resolved
"type": "promptString",
"description": "For which component should the task run?"
mib1185 marked this conversation as resolved.
Show resolved Hide resolved
}
]
}