Skip to content

Use codecov for coverage reports #6941

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

Merged
merged 1 commit into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

| `release` branch | `master` branch | Nightly CI | coverage (`master` branch) |
|-|-|-|-|
| [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/CI?branchName=release)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=88&branchName=release) | [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/CI?branchName=master)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=88&branchName=master) | [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/Nightly%20Build?branchName=master)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=85&branchName=master) | [![Coverage Status](https://coveralls.io/repos/github/microsoft/vscode-python/badge.svg?branch=master)](https://coveralls.io/github/microsoft/vscode-python?branch=master) |
| [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/CI?branchName=release)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=88&branchName=release) | [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/CI?branchName=master)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=88&branchName=master) | [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/Nightly%20Build?branchName=master)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=85&branchName=master) | [![codecov](https://codecov.io/gh/microsoft/vscode-python/branch/master/graph/badge.svg)](https://codecov.io/gh/microsoft/vscode-python) |

[[Development build](https://pvsc.blob.core.windows.net/extension-builds/ms-python-insiders.vsix)]

Expand Down
27 changes: 27 additions & 0 deletions build/ci/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 0
round: down
range: "70...100"

status:
project: yes
patch: yes
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
branch: !release*
layout: "header, diff, files"
behavior: default
require_changes: no
15 changes: 0 additions & 15 deletions build/ci/templates/generate_upload_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ steps:
summaryFileLocation: "$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/coverage"

- bash: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
displayName: 'Upload coverage to coveralls'
continueOnError: true
condition: contains(variables['TestsToRun'], 'testUnitTests')
failOnStderr: false
# Set necessary env variables for coveralls, as they don't support Azure Devops.
# Set variables based on documentation and the coveralls (npm package) source code. 😊.
env:
COVERALLS_SERVICE_JOB_ID: $(Build.BuildId)
COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN)
COVERALLS_SERVICE_NAME: $(COVERALLS_SERVICE_NAME)
COVERALLS_GIT_COMMIT: $(Build.SourceVersion)
COVERALLS_GIT_BRANCH: $(Build.SourceBranchName)
CI_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)

- bash: cat ./coverage/lcov.info | ./node_modules/.bin/codecov --pipe
displayName: 'Upload coverage to codecov'
continueOnError: true
Expand Down
1 change: 1 addition & 0 deletions news/3 Code Health/6938.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upload coverage reports to [codecov](https://codecov.io/gh/microsoft/vscode-python).
26 changes: 0 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2545,8 +2545,8 @@
"@types/glob": "^5.0.35",
"@types/html-webpack-plugin": "^3.2.0",
"@types/iconv-lite": "^0.0.1",
"@types/jsdom": "^11.12.0",
"@types/jquery": "^1.10.35",
"@types/jsdom": "^11.12.0",
"@types/loader-utils": "^1.1.3",
"@types/lodash": "^4.14.104",
"@types/md5": "^2.1.32",
Expand Down Expand Up @@ -2592,7 +2592,6 @@
"codecov": "^3.5.0",
"colors": "^1.2.1",
"copy-webpack-plugin": "^4.6.0",
"coveralls": "^3.0.4",
"cross-spawn": "^6.0.5",
"css-loader": "^1.0.1",
"cucumber-html-reporter": "^4.0.5",
Expand Down