Codecov Delta

Understanding the numbers and syntax

The Codecov Delta (aka Codecov ∆) is our syntax for expressing coverage metrics and their impact on the scope of what is being measured.

Codecov calculations

IDEs and coverage collecting agents report coverage differently. Codecov does not conform to any standard, nor do we make any attempt to express our metrics in the exact same way the IDE, or coverage reports, may express coverage.

  • hit indicates that the source code was executed by the test suite.
  • partial indicates that the source code was not fully executed by the test suite; there are remaining branches that were not executed.
  • miss indicates that the source code was not executed by the test suite.

Coverage is the ratio of hits / (sum of hit + partial + miss). A code base that has 5 lines executed by tests out of 12 total lines will receive a coverage ratio of 41% (rounding down).

Codecov is a reporting tool that is intended to process any coverage report format into a format that is standard across Codecov.

You may change the configuration of how Codecov processes reports and expresses coverage information. Please review our Codecov Yaml to learn about the configuration options.

What is Codecov Delta

absolute <relative> (change)
35% <72%> (+4%)

There are three data points in the Codecov Delta:
1: The absolute scope. e.g., 35%.
2: The relative scope. e.g., <72%>.
3: The change in coverage. e.g., (+4%).

Absolute

The entire project's coverage.

Read as "The entire project coverage is 35%."

Relative

Coverage concerning only lines adjusted in the commit diff (aka the diff coverage)

Read as "The lines I changed in this commit are 72% covered."
Also read as "The coverage of this commit's diff is 72%."

Change

The amount of gain or loss of coverage when compared to the commit's parent.

Read as "This commit increased this project's coverage by 4%."

Examples

Project coverage is 84%.
The commit did not adjust any tracked lines.
The commit did not change the coverage ratio.Project coverage is 84%.
The commit did not adjust any tracked lines.
The commit did not change the coverage ratio.

Project coverage is 84%.
The commit did not adjust any tracked lines.
The commit did not change the coverage ratio.

Project coverage is 72%.
The commit diff was 100% covered.
The commit did not change project coverage.Project coverage is 72%.
The commit diff was 100% covered.
The commit did not change project coverage.

Project coverage is 72%.
The commit diff was 100% covered.
The commit did not change project coverage.

Project coverage is 60.74%.
Commit diff was not affected.
Coverage decreased by .14%.
*An example of [Unexpected Coverage Changes](doc:unexpected-coverage-changes)*.Project coverage is 60.74%.
Commit diff was not affected.
Coverage decreased by .14%.
*An example of [Unexpected Coverage Changes](doc:unexpected-coverage-changes)*.

Project coverage is 60.74%.
Commit diff was not affected.
Coverage decreased by .14%.
An example of Unexpected Coverage Changes.

Project coverage at this commit is 61%.
Commit diff is 100% covered.
Coverage increased by 1%.Project coverage at this commit is 61%.
Commit diff is 100% covered.
Coverage increased by 1%.

Project coverage at this commit is 61%.
Commit diff is 100% covered.
Coverage increased by 1%.

Project coverage is 50%.
Commit diff is 20% covered.
Coverage dropped by 3%.Project coverage is 50%.
Commit diff is 20% covered.
Coverage dropped by 3%.

Project coverage is 50%.
Commit diff is 20% covered.
Coverage dropped by 3%.

Project is 80% covered.
Commit diff was not affected.
Coverage dropped 1%.
*Example of [Coverage Offset](doc:coverage-offset)*.Project is 80% covered.
Commit diff was not affected.
Coverage dropped 1%.
*Example of [Coverage Offset](doc:coverage-offset)*.

Project is 80% covered.
Commit diff was not affected.
Coverage dropped 1%.
Example of Coverage Offset.

What is "ø"?

The character ø represents "not affected" or "no change". This value could be found in the and (change) block of the Coverage Delta.

When found in the block, it represents that the coverage diff was not concerning coverage. (e.g a commit that only adjusts lines not tracked by coverage.)

When found in the (change) block, it represents that coverage did not change. (e.g. 0% change. The commit did not affect project coverage.)

Contexts

We use the Codecov Delta throughout the app. It expresses details for the entire project, flags, diffs, folders and files. It is important to understand the context of the delta.

The absolute, relative, and change metrics refer to the context. In the example below, the Codecov Delta appears in the file headers. The Delta's metrics concern only the file itself.

The file `reference.go` is 79% covered.
In this commit there was 12 lines added which were 100% covered.
It results in the file having 5% more coverage.The file `reference.go` is 79% covered.
In this commit there was 12 lines added which were 100% covered.
It results in the file having 5% more coverage.

The file reference.go is 79% covered.
In this commit there was 12 lines added which were 100% covered.
It results in the file having 5% more coverage.


Did this page help you?
\\n\\n\",\n \"language\": \"html\",\n \"name\": \"web/index.html\"\n },\n {\n \"code\": \"{\\n \\\"name\\\": \\\"web\\\",\\n \\\"version\\\": \\\"1.0.0\\\",\\n \\\"description\\\": \\\"\\\",\\n \\\"scripts\\\": {\\n \\\"test\\\": \\\"jest --collectCoverage\\\",\\n \\\"build\\\": \\\"babel --plugins @babel/plugin-transform-modules-commonjs script.js\\\"\\n },\\n \\\"keywords\\\": [],\\n \\\"author\\\": \\\"\\\",\\n \\\"license\\\": \\\"MIT\\\",\\n \\\"dependencies\\\": {\\n \\\"axios\\\": \\\"^0.25.0\\\",\\n \\\"express\\\": \\\"^4.17.2\\\"\\n },\\n \\\"devDependencies\\\": {\\n \\\"@babel/plugin-transform-modules-commonjs\\\": \\\"^7.16.8\\\",\\n \\\"jest\\\": \\\"^27.4.7\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"web/package.json\"\n },\n {\n \"code\": \"const axios = require('axios')\\nconst express = require(\\\"express\\\");\\nconst path = require(\\\"path\\\");\\n\\nconst app = express();\\n\\nconst backendHost = 'http://localhost';\\nconst backendPort = '8080';\\n\\napp.use(express.json());\\napp.use(\\\"/static\\\", express.static(path.resolve(__dirname, \\\"static\\\")));\\n\\napp.post(\\\"/api/:operation\\\", (req, res) => {\\n axios.post(\\n backendHost + ':' + backendPort + '/api/' + req.params['operation'],\\n req.body\\n ).then(response => {\\n res.json(response.data);\\n }).catch(error => {\\n console.log(\\\"Error: \\\" + error);\\n });\\n});\\n\\napp.get(\\\"/\\\", (req, res) => {\\n res.sendFile(path.resolve(\\\"index.html\\\"));\\n});\\napp.listen(process.env.PORT || 3000, () => console.log(\\\"Server running...\\\"));\",\n \"language\": \"javascript\",\n \"name\": \"web/server.js\"\n }\n ]\n}\n[/block]\nIn that `web/static` folder, you can add the following files\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"*, *::before, *::after {\\n box-sizing: border-box;\\n}\\n\\nbody {\\n margin: 0;\\n padding: 0;\\n background-color: #ccc;\\n}\\n\\n.calculator {\\n align-content: center;\\n display: grid;\\n grid-template-columns: repeat(4, 100px);\\n grid-template-rows: minmax(120px, auto) repeat(5, 100px);\\n justify-content: center;\\n min-height: 100vh;\\n}\\n\\n.calculator > button {\\n background-color: rbga(255, 255, 255, 0.75);\\n border: 1px solid #FFFFFF;\\n cursor: pointer;\\n font-size: 32px;\\n outline: none;\\n}\\n\\n.calculator > button:hover {\\n background-color: #aaaaaa;\\n}\\n\\n.span-3 {\\n grid-column: span 3;\\n}\\n\\n.disabled:hover {\\n background-color: rbga(255, 255, 255, 0.75);\\n cursor: not-allowed;\\n}\\n\\n.output{\\n align-items: flex-end;\\n background-color: rgba(0, 0, 0, 0.75);\\n display: flex;\\n flex-direction: column;\\n grid-column: 1 / -1;\\n justify-content: space-around;\\n padding: 10px;\\n word-break: break-all;\\n word-wrap: break-word;\\n}\\n\\n.output .previous-operand{\\n color: rgba(255,255, 255, 0.75);\\n}\\n\\n.output .current-operand{\\n color: white;\\n font-size: 42px;\\n}\",\n \"language\": \"css\",\n \"name\": \"web/static/css/calculator.css\"\n },\n {\n \"code\": \"export class Calculator {\\n constructor(previousOperandTextElement, currentOperandTextElement) {\\n this.previousOperandTextElement = previousOperandTextElement\\n this.currentOperandTextElement = currentOperandTextElement\\n this.clear()\\n }\\n\\n clear() {\\n this.currentOperand = ''\\n this.previousOperand = ''\\n this.operation = undefined\\n this.validOperand = true\\n }\\n\\n delete() {\\n this.currentOperand = this.currentOperand.toString().slice(0, -1)\\n }\\n\\n appendNumber(number) {\\n if (!this.validOperand) return\\n if (number === '.' && this.currentOperand.includes('.')) return\\n this.currentOperand = this.currentOperand.toString() + number.toString()\\n }\\n\\n chooseOperation(operation) {\\n if (!this.validOperand) return\\n if (this.currentOperand === '') return\\n if (this.previousOperand !== '') {\\n this.compute()\\n }\\n this.operation = operation\\n this.previousOperand = this.currentOperand\\n this.currentOperand = ''\\n }\\n\\n compute() {\\n if (!this.validOperand) {\\n return;\\n }\\n\\n const prev = parseFloat(this.previousOperand)\\n const current = parseFloat(this.currentOperand)\\n if (isNaN(prev) || isNaN(current)) return\\n\\n let operation\\n switch (this.operation) {\\n case '+':\\n operation = 'add'\\n break\\n case '-':\\n operation = 'subtract'\\n break\\n case '*':\\n operation = 'multiply'\\n break\\n case '÷':\\n operation = 'divide'\\n break\\n default:\\n return\\n }\\n this.callApi(operation)\\n }\\n\\n async callApi(operation) {\\n const response = await fetch(\\\"/api/\\\" + operation, {\\n method: 'POST',\\n headers: {\\n 'Accept': 'application/json',\\n 'Content-Type': 'application/json'\\n },\\n body: JSON.stringify({\\n x: this.previousOperand,\\n y: this.currentOperand\\n })\\n })\\n if (!response.ok) {\\n throw new Error(\\\"Error: \\\" + response.status);\\n }\\n this.currentOperand = await response.json();\\n this.operation = undefined;\\n this.previousOperand = '';\\n this.updateDisplay();\\n }\\n\\n getDisplayNumber(number) {\\n const stringNumber = number.toString()\\n const integerDigits = parseFloat(stringNumber.split('.')[0])\\n const decimalDigits = stringNumber.split('.')[1]\\n let integerDisplay\\n if (isNaN(integerDigits)) {\\n integerDisplay = stringNumber;\\n if (stringNumber.length > 0) {\\n this.validOperand = false;\\n }\\n } else {\\n integerDisplay = integerDigits.toLocaleString('en', { maximumFractionDigits: 0 })\\n }\\n if (decimalDigits != null) {\\n return `${integerDisplay}.${decimalDigits}`\\n } else {\\n return integerDisplay\\n }\\n }\\n\\n updateDisplay() {\\n this.currentOperandTextElement.innerText =\\n this.getDisplayNumber(this.currentOperand)\\n if (this.operation != null) {\\n this.previousOperandTextElement.innerText =\\n `${this.getDisplayNumber(this.previousOperand)} ${this.operation}`\\n } else {\\n this.previousOperandTextElement.innerText = ''\\n }\\n }\\n}\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculator.js\"\n },\n {\n \"code\": \"import { Calculator } from './calculator.js';\\n\\nconst numberButtons = document.querySelectorAll('[data-number]')\\nconst operationButtons = document.querySelectorAll('[data-operation]')\\nconst equalsButton = document.querySelector('[data-equals]')\\nconst allClearButton = document.querySelector('[data-all-clear]')\\nconst previousOperandTextElement = document.querySelector('[data-previous-operand]')\\nconst currentOperandTextElement = document.querySelector('[data-current-operand]')\\n\\nconst calculator = new Calculator(previousOperandTextElement, currentOperandTextElement)\\n\\nnumberButtons.forEach(button => {\\n button.addEventListener('click', () => {\\n calculator.appendNumber(button.innerText)\\n calculator.updateDisplay()\\n })\\n})\\n\\noperationButtons.forEach(button => {\\n button.addEventListener('click', () => {\\n calculator.chooseOperation(button.innerText)\\n calculator.updateDisplay()\\n })\\n})\\n\\nequalsButton.addEventListener('click', button => {\\n calculator.compute()\\n})\\n\\nallClearButton.addEventListener('click', button => {\\n calculator.clear()\\n calculator.updateDisplay()\\n})\\n\\ndocument.addEventListener('keydown', function (event) {\\n let patternForNumbers = /[0-9]/g;\\n let patternForOperators = /[+\\\\-*\\\\/]/g\\n if (event.key.match(patternForNumbers)) {\\n event.preventDefault();\\n calculator.appendNumber(event.key)\\n calculator.updateDisplay()\\n }\\n if (event.key === '.') {\\n event.preventDefault();\\n calculator.appendNumber(event.key)\\n calculator.updateDisplay()\\n }\\n if (event.key.match(patternForOperators)) {\\n event.preventDefault();\\n calculator.chooseOperation(event.key)\\n calculator.updateDisplay()\\n }\\n if (event.key === 'Enter' || event.key === '=') {\\n event.preventDefault();\\n calculator.compute()\\n }\\n});\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculatorView.js\"\n }\n ]\n}\n[/block]\nWe can test out our frontend by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"cd web\\nnpm install\\nnode server.js\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nBe sure to run the backend server as well in a different terminal.\nGo to `http://localhost:3000` to view the calculator\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/cacb481-1.png\",\n \"1.png\",\n 456,\n 698,\n \"#cacaca\"\n ]\n }\n ]\n}\n[/block]\nFeel free to play around with the interface.\n\n### Writing frontend tests\nLet’s now add tests to our `calculator.js` file\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"const calc = require('./calculator');\\n\\ndescribe('Calculator test suite', () => {\\n test('calculator clears', () => {\\n const calculator = new calc.Calculator();\\n calculator.clear();\\n\\n expect(calculator.currentOperand).toBe('');\\n expect(calculator.previousOperand).toBe('');\\n expect(calculator.operation).toBe(undefined);\\n expect(calculator.validOperand).toBe(true);\\n })\\n\\n test('calculator can input numbers', () => {\\n const calculator = new calc.Calculator();\\n calculator.appendNumber(1);\\n expect(calculator.currentOperand).toBe('1');\\n\\n calculator.appendNumber(2);\\n expect(calculator.currentOperand).toBe('12');\\n })\\n\\n test('calculator can deletes', () => {\\n const calculator = new calc.Calculator();\\n calculator.appendNumber(1);\\n expect(calculator.currentOperand).toBe('1');\\n\\n calculator.appendNumber(2);\\n expect(calculator.currentOperand).toBe('12');\\n\\n calculator.delete();\\n expect(calculator.currentOperand).toBe('1');\\n })\\n})\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculator.test.js\"\n }\n ]\n}\n[/block]\n### Run the tests\nWe can run tests locally with the following command\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"npm run test\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nand we should see the following output\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"PASS static/js/calculator.test.js\\n Calculator test suite\\n ✓ calculator clears (3 ms)\\n ✓ calculator can input numbers\\n ✓ calculator can deletes\\n\\n---------------|---------|----------|---------|---------|-------------------\\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s\\n---------------|---------|----------|---------|---------|-------------------\\nAll files | 18.03 | 9.09 | 44.44 | 19.64 |\\n calculator.js | 18.03 | 9.09 | 44.44 | 19.64 | 26-113\\n---------------|---------|----------|---------|---------|-------------------\\nTest Suites: 1 passed, 1 total\\nTests: 3 passed, 3 total\\nSnapshots: 0 total\\nTime: 0.967 s\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### Add a frontend CI workflow\nLet’s add a workflow to run our frontend tests\n\n#### GitHub Actions\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"name: Frontend workflow\\n\\non: [push, pull_request]\\n\\njobs:\\n build:\\n runs-on: ubuntu-latest\\n name: Test JS frontend\\n defaults:\\n run:\\n working-directory: ./web\\n steps:\\n - uses: actions/checkout@v1\\n - uses: actions/setup-node@v2\\n with:\\n node-version: '16'\\n - name: Install requirements\\n run: npm install\\n - name: Run tests and collect coverage\\n run: npm run test\\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v2\",\n \"language\": \"yaml\",\n \"name\": \".gihtub/workflows/frontend.yml\"\n }\n ]\n}\n[/block]\n#### CircleCI\n`...` is used to demark previous code, be sure add in the applicable lines in the appropriate areas.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"jobs:\\n ...\\n test-frontend:\\n docker:\\n - image: cimg/node:17.6.0\\n steps:\\n - checkout\\n - run:\\n name: Install requirements\\n command: cd web && npm install\\n - run:\\n name: Run tests and collect coverage\\n command: cd web && npm run test\\n - codecov/upload\\n\\nworkflows:\\n ...\\n build-test:\\n jobs:\\n ...\\n - test-frontend\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n }\n ]\n}\n[/block]\nThis workflow does a similar set of steps as our API workflow. If we commit this code,\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"cd .. # back to the root directory\\ngit add .\\ngit commit -m 'step4: add frontend and tests'\\ngit push origin step4\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nand open a PR, we see that our code coverage has greatly decreased! With the addition of the new, but poorly tested frontend, our status checks fail.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/889d721-2.png\",\n \"2.png\",\n 916,\n 464,\n \"#1b1e23\"\n ]\n }\n ]\n}\n[/block]\nWe also see that in the Codecov comment.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/573d0a5-3.png\",\n \"3.png\",\n 787,\n 710,\n \"#29322c\"\n ]\n }\n ]\n}\n[/block]\nWe see this type of situation happen all the time. For example, some projects in a monorepository might be starting code coverage for the first time, while other parts have been using Codecov for months or years. Adding code coverage like this can greatly decrease the percentage for the whole project.\n\nHowever, what you may not have noticed is that Codecov automatically merges coverage reports together, regardless of the language or CI workflow. This happens under the hood and requires no additional configuration from you.\n\nIn the next section, we'll show you how to use [Codecov Flags](doc:flags) to help group coverage reports and to set different coverage standards for different parts of your project.","order":4,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"step-4-merging-reports-and-codecov-flags","slugUpdatedAt":"2022-03-05T06:32:52.393Z","createdAt":"2022-02-15T19:43:10.529Z","updatedAt":"2022-05-24T20:45:14.882Z","user":"5b47e58599e0430003d8e823","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"6222f5d241980900ac6575d5","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"4b - Setting coverage standards with Flags","updates":[],"type":"basic","slug":"step-4b-setting-coverage-standards-with-flags","excerpt":"","body":"Codecov’s [Flags](​​https://docs.codecov.com/docs/flags) helps this situation by grouping coverage reports by function. Let’s set up flags in our example so that we can simulate an instance where the backend is well-tested and wants to maintain high code coverage, while the frontend is new and only expected to increase with each new commit.\n\n### Add flags to the Codecov configuration\n**Re-write** the `codecov.yml` file with the below\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project: off\\n patch: off\\n\\nflag_management:\\n individual_flags:\\n - name: backend\\n paths:\\n - api/\\n statuses:\\n - type: project\\n target: 100%\\n threshold: 1%\\n - name: frontend\\n paths:\\n - web/\\n statuses:\\n - type: project\\n target: auto\\n threshold: 1%\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nNotice that we are creating two flags `backend` and `frontend` that encompass the `api` and `web` directories, respectively. The `backend` flag will target 100% overall coverage, while the `frontend` flag is set to `auto`. This means that every new commit must maintain or raise the overall code coverage of the project.\n\n### Update the uploader call with flags\nUpdate the workflows to send the proper flag with each coverage report\n\n#### GitHub Actions\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"... \\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v2\\n with:\\n flags: backend\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/api.yml\"\n },\n {\n \"code\": \"...\\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v2\\n with:\\n flags: frontend\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/frontend.yml\"\n }\n ]\n}\n[/block]\n#### CircleCI\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"jobs:\\n test-api:\\n ...\\n - codecov/upload:\\n flags: backend\\n test-frontend:\\n ...\\n - codecov/upload:\\n flags: frontend\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n }\n ]\n}\n[/block]\nCommit your changes and push them to GitHub\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step4: add Codecov Flags'\\ngit push origin step4\",\n \"language\": \"shell\",\n \"name\": null\n }\n ]\n}\n[/block]\nNow you see 4 status checks from Codecov that are passing.\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/2bc6b63-4.png\",\n \"4.png\",\n 821,\n 429,\n \"#1b2125\"\n ]\n }\n ]\n}\n[/block]","order":5,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"5-setting-coverage-standards-with-flags","slugUpdatedAt":"2022-03-05T06:33:03.402Z","createdAt":"2022-03-05T05:32:02.134Z","updatedAt":"2022-03-08T22:53:05.755Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"620c029aa3d4d000a921897d","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"5 - Test what you change with Carryforward Flags","updates":[],"type":"basic","slug":"step-5-carryforward-flags","excerpt":"","body":"Although Flags can help separate out different test suites, not every project will run the entire test suite for every commit. Carryforward Flags can be used here to maintain consistent coverage values.\n\n### Update CI workflows to run on applicable changes\nPull the latest from `main` and create a new branch `step5`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git checkout main\\ngit pull\\ngit checkout -b 'step5'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nLet’s set up our demo repository to only run workflows if the affected code is changed. \n\n#### GitHub Actions\nEdit the `on:` section of both workflows\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"...\\non:\\n push:\\n paths:\\n - 'api/**'\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/api.yml\"\n },\n {\n \"code\": \"...\\non:\\n push:\\n paths:\\n - 'web/**'\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/frontend.yml\"\n }\n ]\n}\n[/block]\n#### CircleCI\nRunning jobs based on files changed in a directory requires CircleCI's [path-filtering orb](https://circleci.com/developer/orbs/orb/circleci/path-filtering) and [dynamic config](https://circleci.com/docs/2.0/dynamic-config/#getting-started-with-dynamic-config-in-circleci). \n\nDue to [this issue](https://rdmd.readme.io/docs/features#known-issues), be sure to replace `<>` and `<>` with \\<> and \\<> , respectively.\n\n**You will need to [enable dynamic config](https://circleci.com/docs/2.0/dynamic-config/#getting-started-with-dynamic-config-in-circleci).**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: 2.1\\n\\nsetup: true\\n\\norbs:\\n path-filtering: circleci/path-filtering@0.1.1\\n\\nworkflows:\\n jobs:\\n - path-filtering/filter:\\n mapping: |\\n api/.* test-api-job true\\n web/.* test-frontend-job true\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n },\n {\n \"code\": \"version: 2.1\\n\\norbs:\\n codecov: codecov/codecov@3.2.2\\n\\nparameters:\\n test-api-job:\\n type: boolean\\n default: false\\n test-frontend-job:\\n type: boolean\\n default: false\\n\\njobs:\\n test-api:\\n docker:\\n - image: cimg/python:3.10.2\\n name: Install requirements\\n command: pip install -r api/requirements.txt\\n - run:\\n name: Run tests and collect coverage\\n command: pytest --cov --cov-report xml .\\n - codecov/upload:\\n flags: backend\\n test-frontend:\\n docker:\\n - image: cimg/node:17.6.0\\n steps:\\n - checkout\\n - run:\\n name: Install requirements\\n command: cd web && npm install\\n - run:\\n name: Run tests and collect coverage\\n command: cd web && npm run test\\n - codecov/upload:\\n flags: frontend\\n\\nworkflows:\\n test-api-workflow:\\n when: << pipeline.parameters.test-api-job >>\\n jobs:\\n - test-api\\n test-frontend-workflow:\\n when: << pipeline.parameters.test-frontend-job >>\\n jobs:\\n - test-frontend\",\n \"language\": \"yaml\",\n \"name\": \".circleci/continue_config.yml\"\n }\n ]\n}\n[/block]\nNow, if we make a change to only code in the `web` directory, the `frontend` workflow will run.\n\n### Add coverage to the frontend\nLet’s add a test to our calculator.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"...\\n test('test operation', () => {\\n const calculator = new calc.Calculator();\\n calculator.chooseOperation('+');\\n expect(calculator.operation).toBeUndefined();\\n\\n calculator.appendNumber(1);\\n calculator.appendNumber(2);\\n calculator.chooseOperation('+');\\n expect(calculator.currentOperand).toBe('');\\n expect(calculator.operation).toBe('+');\\n expect(calculator.previousOperand).toBe('12');\\n\\n calculator.appendNumber(3);\\n calculator.appendNumber(4);\\n expect(calculator.currentOperand).toBe('34');\\n expect(calculator.operation).toBe('+');\\n expect(calculator.previousOperand).toBe('12');\\n })\\n...\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculator.test.js\"\n }\n ]\n}\n[/block]\nRun `cd web && npm run test` to ensure that the test has been added in correctly.\n\n### Turn Flags into Carryforward Flags\nFinally, we will need to make a change to our `codecov.yml` file to ensure that Flags are marked as Carryforward.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"...\\nflag_management:\\n default_rules:\\n carryforward: true\\n...\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nCommit and push your changes to GitHub.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step5: add Carryforward Flags'\\ngit push origin step5\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nNotice that only the `frontend` workflow runs. In the `Flag` section of the Codecov comment, you will only see the `frontend` Flag.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f3e8e13-5.png\",\n \"5.png\",\n 832,\n 766,\n \"#292724\"\n ]\n }\n ]\n}\n[/block]\n### Conclusion\nAt this point, you have worked through the major features of Codecov. From here, you can explore other advanced aspects of the product.\n\n- [More yaml configuration](https://docs.codecov.com/docs/codecovyml-reference)\n- [In-line coverage on GitHub](https://docs.codecov.com/docs/github-checks)\n- [Sourcegraph browser extension](https://docs.codecov.com/docs/browser-extension)","order":6,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T16:17:04.724Z","createdAt":"2022-02-15T19:44:26.833Z","updatedAt":"2022-03-08T23:35:06.643Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0}],"childrenPages":[{"_id":"620bfe4326e0a600da2f0030","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"0 - Setting up the demo repository","updates":[],"type":"basic","slug":"step-0-setting-up-the-repository","excerpt":"","body":"To start, let’s set up the demo repository. \n\n\n### Fork and clone the repository\n\n- **GitHub**\n**[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository)** the [demo repository](https://github.com/codecov/codecov-demo) from GitHub. It is strongly recommended that you fork the repository to your personal GitHub account.\n**[Clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository)** your new repository to your local machine.\n\n\n### Checkout a new branch\nAfter you have cloned the repository, **checkout** a new branch `step0`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"cd codecov-demo\\ngit checkout -b step0\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### Install the dependencies\n`pip` **install** `flask` and `pytest-cov` by running and saving down these dependencies. Note that it is recommended that this is done in a [virtual environment](https://docs.python.org/3/library/venv.html).\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"pip install flask\\npip install pytest-cov\\npip freeze --local > api/requirements.txt\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n**Ensure** your repository has the following structure.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"--> tree\\n.\\n├── LICENSE\\n├── README.md\\n└── api\\n ├── __init__.py\\n └── requirements.txt\\n\\n1 directory, 4 files\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### Commit and merge your changes\n**Commit** your changes by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step0: add python dependencies'\\ngit push origin step0\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n**Create** a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) on GitHub and **merge** the changes.\n**When opening pull requests, be sure to select your own repository as the base branch.**","order":0,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T16:21:47.663Z","createdAt":"2022-02-15T19:25:55.695Z","updatedAt":"2022-05-28T20:00:08.448Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"620bfe9fd74914004573f218","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"1 - Setting and getting code coverage","updates":[],"type":"basic","slug":"step-1-setting-and-getting-code-coverage","excerpt":"","body":"### Switch to a new branch\n**Pull** the latest from `main` and **create** a new branch `step1`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git checkout main\\ngit pull\\ngit checkout -b 'step1'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### Add a calculator backend\nLet's continue by adding in our calculator logic. Create the file `api/calculator.py` with the following contents:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"class Calculator:\\n def add(x, y):\\n return x + y\\n\\n def subtract(x, y):\\n return x - y\\n\\n def multiply(x, y):\\n return x * y\\n\\n def divide(x, y):\\n if y == 0:\\n return 'Cannot divide by 0'\\n return x * 1.0 / y\",\n \"language\": \"python\",\n \"name\": \"api/calculator.py\"\n }\n ]\n}\n[/block]\nWe are defining a `Calculator` class that can `add`, `subtract`, `multiply`, and `divide`. Next, we are going to create a simple Flask server to run our calculator code. Create a file `api/app.py`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"from flask import (\\n Flask,\\n request,\\n)\\n\\nfrom calculator import Calculator\\n\\napp = Flask(__name__)\\n\\n@app.route('/api/add', methods=['POST'])\\ndef add():\\n return operation('add', 2)\\n\\n@app.route('/api/subtract', methods=['POST'])\\ndef subtract():\\n return operation('subtract', 2)\\n\\n@app.route('/api/multiply', methods=['POST'])\\ndef multiply():\\n return operation('multiply', 2)\\n\\n@app.route('/api/divide', methods=['POST'])\\ndef divide():\\n return operation('divide', 2)\\n\\ndef operation(method, num_factors):\\n factors = []\\n if num_factors == 2:\\n factors.append(float(request.json.get('x')))\\n factors.append(float(request.json.get('y')))\\n\\n return str(getattr(Calculator, method)(*factors))\\n\\n\\napp.run(host='0.0.0.0', port=8080)\",\n \"language\": \"python\",\n \"name\": \"api/app.py\"\n }\n ]\n}\n[/block]\n\nThe server accepts `POST` requests to the `/api/add`, `/api/subtract`, `/api/multiply`, and `/api/divide` endpoints. It expects to receive `JSON` values `x` and `y` as data.\n\n### Run the server\nYou can start the server by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"python api/app.py\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nin a terminal from the `root` directory. You can test if the server is running by hitting one of the above endpoints. Try it by running the command below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -d '{\\\"x\\\": 1, \\\"y\\\": 2}' -H 'Content-Type: application/json' http://localhost:8080/api/add\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\nYou can see that the server is adding `1` and `2` together and returning `3.0`.\n\n### Add backend tests\nLet's add some tests for our calculator. Create a new directory `tests` in `api` and add a blank `__init__.py` file.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"mkdir api/tests\\ntouch api/tests/__init__.py\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nWrite the test file `test_calculator.py`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"from ..calculator import Calculator\\n\\n\\ndef test_add():\\n assert Calculator.add(1, 2) == 3.0\\n assert Calculator.add(1.0, 2.0) == 3.0\\n assert Calculator.add(0, 2.0) == 2.0\\n assert Calculator.add(2.0, 0) == 2.0\\n assert Calculator.add(-4, 2.0) == -2.0\\n\\ndef test_subtract():\\n assert Calculator.subtract(1, 2) == -1.0\\n assert Calculator.subtract(2, 1) == 1.0\\n assert Calculator.subtract(1.0, 2.0) == -1.0\\n assert Calculator.subtract(0, 2.0) == -2.0\\n assert Calculator.subtract(2.0, 0.0) == 2.0\\n assert Calculator.subtract(-4, 2.0) == -6.0\\n\\ndef test_multiply():\\n assert Calculator.multiply(1, 2) == 2.0\\n assert Calculator.multiply(1.0, 2.0) == 2.0\\n assert Calculator.multiply(0, 2.0) == 0.0\\n assert Calculator.multiply(2.0, 0.0) == 0.0\\n assert Calculator.multiply(-4, 2.0) == -8.0\\n\\ndef test_divide():\\n assert Calculator.divide(1, 2) == 0.5\\n assert Calculator.divide(1.0, 2.0) == 0.5\\n assert Calculator.divide(0, 2.0) == 0\\n assert Calculator.divide(-4, 2.0) == -2.0\",\n \"language\": \"python\",\n \"name\": \"api/tests/test_calculator.py\"\n }\n ]\n}\n[/block]\n### Run the tests and collect code coverage\nRun the command below to run tests in a terminal\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"pytest\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nHowever, we are more curious about the code coverage of our `calculator` class. We can use the command\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"pytest --cov api/\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\nto show us coverage results. Doing this should give you a report that looks like\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"Name Stmts Miss Cover\\n--------------------------------------------------\\napi/__init__.py 0 0 100%\\napi/app.py 22 22 0%\\napi/calculator.py 11 1 91%\\napi/tests/__init__.py 0 0 100%\\napi/tests/test_calculator.py 25 0 100%\\n--------------------------------------------------\\nTOTAL 58 23 60%\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\nNotice that `api/app.py` isn’t covered, as we haven’t tested the Flask application, but our `api/calculatory.py` file is missing tests on one line of code.\n\n###Commit and merge your changes\nYou can commit this code to the repository by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step1: add calculator backend and tests'\\ngit push origin step1\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nCreate a pull request/merge request on GitHub/GitLab and merge the changes.\n**When opening pull requests, be sure to select your own repository as the base branch.**","order":1,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T16:17:04.846Z","createdAt":"2022-02-15T19:27:27.602Z","updatedAt":"2022-05-28T19:42:24.546Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"620bff9c87087e0031071168","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"2 - Getting a Codecov account and uploading coverage","updates":[],"type":"basic","slug":"step-2-getting-a-codecov-account-and-uploading-coverage","excerpt":"","body":"Create a new branch `step2`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git checkout main\\ngit pull\\ngit checkout -b 'step2'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nBefore we continue, let’s create an account and set up our repository on [Codecov](https://codecov.io).\n\n### Create a Codecov account\nCreate an account on Codecov by clicking on our [signup page](https://about.codecov.io/sign-up/) and following the prompts.\n\n#### GitHub\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"GitHub Third-party application access\",\n \"body\": \"If you are signing up via GitHub, you may need to request access from an admin to authorize Codecov as a third-party application.\\n\\nAn admin can approve this request in the \\\"Third-party access\\\" tab in the organization's settings page:\\nhttps://github.com/organizations/[YOUR_ORG_NAME]/settings/oauth_application_policy.\\n\\nFor more information see GitHub OAuth Admin Authorization or follow our video guide.\"\n}\n[/block]\n**Install** the Codecov [GitHub app integration](https://github.com/apps/codecov) for the demo repository.\n\n#### GitLab\nSet up the [Team Bot](doc:team-bot). If you are using your personal account, you can create a `codecov.yml` file in the root directory.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n bot: {{ YOUR_USERNAME }} # e.g. bot: thomasrockhu-codecov\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nNow that we have set up our Codecov account, let’s upload coverage reports.\n\n### Create CI pipeline\nCreate a configuration file for your CI. The CI workflows below will checkout the code, install requirements, run tests, and upload the coverage reports to Codecov.\n\n#### GitHub Actions\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"name: API workflow\\n\\non: [push, pull_request]\\n\\njobs:\\n build:\\n runs-on: ubuntu-latest\\n name: Test python API\\n defaults:\\n run:\\n working-directory: ./api\\n steps:\\n - uses: actions/checkout@v1\\n - uses: actions/setup-python@v2\\n with:\\n python-version: '3.10'\\n - name: Install requirements\\n run: pip install -r requirements.txt\\n - name: Run tests and collect coverage\\n run: pytest --cov .\\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v3\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/api.yml\"\n }\n ]\n}\n[/block]\nThe upload step uses the [Codecov GitHub action](https://github.com/codecov/codecov-action). It is built on top of our [uploader](https://github.com/codecov/uploader). It is recommended to use the `action` as it automatically runs [integrity checks](https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader) on the binary.\n\n#### CircleCI\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: 2.1\\n\\norbs:\\n codecov: codecov/codecov@3.2.2\\n\\njobs:\\n test-api:\\n docker:\\n - image: cimg/python:3.10.2\\n steps:\\n - checkout\\n - run:\\n name: Install requirements\\n command: pip install -r api/requirements.txt\\n - run:\\n name: Run tests and collect coverage\\n command: pytest --cov api/\\n - codecov/upload\\n\\nworkflows:\\n version: 2.1\\n build-test:\\n jobs:\\n - test-api\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n }\n ]\n}\n[/block]\nThe upload step uses the [Codecov CircleCI Orb](https://github.com/codecov/codecov-circleci-orb). It is built on top of our [uploader](https://github.com/codecov/uploader). It is recommended to use the `Orb` as it automatically runs [integrity checks](https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader) on the binary.\n\n#### GitLabCI\nBe sure to pull the `CODECOV_TOKEN` from the `settings` tab of the repository in Codecov. **You will need to add it as an environment variable in GitLab**. Go to `Settings -> CI -> Variables`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"api:\\n image: python:latest\\n script:\\n - pip install -r api/requirements.txt\\n - pytest --cov api/\\n - curl -Os https://uploader.codecov.io/latest/linux/codecov\\n - chmod +x codecov\\n - ./codecov\",\n \"language\": \"yaml\",\n \"name\": \".gitlab-ci.yml\"\n }\n ]\n}\n[/block]\n\n### Commit the changes and run the CI workflow\nLet’s commit our code and open a pull request. Run\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step2: upload coverage reports to Codecov'\\ngit push origin step2\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nNext, go to the demo repository on GitHub and open a pull request (PR). \n\n**When opening pull requests, be sure to select your own repository as the base branch.**\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/a9df8f2-1.png\",\n \"1.png\",\n 914,\n 314,\n \"#1a1d21\"\n ]\n }\n ]\n}\n[/block]\nYou will see status checks on the PR from the CI. You can click on them to see the progress of the CI/CD. Once complete, you will receive status checks and a comment from Codecov.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4738cbb-2.png\",\n \"2.png\",\n 912,\n 395,\n \"#1a2024\"\n ]\n }\n ]\n}\n[/block]\n`codecov/patch` and `codecov/project` status checks\n\nOne of Codecov’s core uses is getting code coverage information directly in a developer’s workflow. The status checks shown above are part of that. \n\n- The `project` check is used to maintain a coverage percentage across an entire codebase\n- The `patch` check is used for code changed in a PR. \n\nA more mature repository may have strict a `project` percentage, while a project new to code coverage may only expect new code to be well-tested (`patch` coverage). We will be setting some of these values in this section, but you can read more about status checks [here](https://docs.codecov.com/docs/commit-status).\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/5133722-3.png\",\n \"3.png\",\n 691,\n 778,\n \"#263326\"\n ]\n }\n ]\n}\n[/block]\nIf you go to the project on Codecov, you will notice that the dashboard is blank. This is because no coverage information has been uploaded onto the default branch. We can fix this by merging the pull request.\n\nMerge the pull request on GitHub and wait for the CI/CD to complete.\n**When opening pull requests, be sure to select your own repository as the base branch.**","order":2,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T16:17:04.307Z","createdAt":"2022-02-15T19:31:40.566Z","updatedAt":"2022-05-28T19:54:54.290Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"620c011bb917c0002142274b","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"3 - Customizing Codecov","updates":[],"type":"basic","slug":"step-3-customizing-codecov","excerpt":"","body":"### Identify untested code\n\nNow that we have coverage on our `main` branch, let’s see how to improve our coverage. Go back to [Codecov](https://app.codecov.io/gh) and click your demo repository. If you are not seeing any coverage information, click `settings` on the top right and ensure your default branch is `main`. \n\nBack on the dashboard, you will see some data relating to our recent commit. On the top is the coverage chart which will show you coverage change over time. Below that is a sunburst graph that highlights parts of the codebase that have low coverage. To the right of that are the most recent commits. However, we will use the bottom section, the Fileviewer, to identify lines of code that haven’t been tested.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/bf96f08-1.png\",\n \"1.png\",\n 608,\n 210,\n \"#f8f9f8\"\n ]\n }\n ]\n}\n[/block]\nClick on `api` and `calculator.py` to see what line hasn’t been covered.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/7808f23-2.png\",\n \"2.png\",\n 671,\n 470,\n \"#f8faf9\"\n ]\n }\n ]\n}\n[/block]\nNote that we haven’t added a test for dividing by 0.\n\n### Set coverage standards\nBefore we add the test, let’s ensure that our coverage always hits 100%. Create a new branch `step3`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git checkout main\\ngit pull\\ngit checkout -b 'step3'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nCreate a new file `codecov.yml` in the `root` directory of the git repository.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default:\\n target: 100%\\n threshold: 1%\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThis configuration tells Codecov to fail a status check if 100% of the codebase is not covered with tests. However, it also allows for a 1% threshold, meaning the true minimum is 99%.\n\nCommit the new file and open a pull request\n**When opening pull requests, be sure to select your own repository as the base branch.**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step3: add project status check target'\\ngit push origin step3\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nYou will notice that after CI finishes, we have a failing status check\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/0fe7c08-3.png\",\n \"3.png\",\n 713,\n 419,\n \"#1c1f24\"\n ]\n }\n ]\n}\n[/block]\nSince our project still has an uncovered line, we will need to add a test to cover it before we can merge our code.\n\n### Add a test for uncovered code\nAt the end of `api/tests/test_calculator.py` add a test for the divide by 0 case\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"def test_divide_by_0():\\n assert Calculator.divide(2.0, 0) == 'Cannot divide by 0'\",\n \"language\": \"python\",\n \"name\": \"api/tests/test_caluclator.py\"\n }\n ]\n}\n[/block]\nto the end of the file. Let’s commit our code again and see if our project is fully covered.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step3: cover divide by 0 case'\\ngit push origin step3\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nWe now see all of our status checks passing\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/974179f-4.png\",\n \"4.png\",\n 698,\n 424,\n \"#1b2125\"\n ]\n }\n ]\n}\n[/block]\nand the Codecov comment \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/2149f4f-5.png\",\n \"5.png\",\n 740,\n 726,\n \"#3a3e42\"\n ]\n }\n ]\n}\n[/block]\nshows coverage increasing in the `api/calculator.py` as we expect.\n\n### Add the Codecov badge\nFinally, let’s add a Codecov badge to a `README.md` file. You can copy the Markdown code from the `Settings` tab in Codecov, under `Badge`.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/36b0309-6.png\",\n \"6.png\",\n 948,\n 567,\n \"#f1f2f2\"\n ]\n }\n ]\n}\n[/block]\nYour `README.md` file will look something like\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"[![codecov](https://codecov.io/gh/{{REPOSITORY}}/branch/main/graph/badge.svg)](https://codecov.io/gh/{{REPOSITORY}})\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\nAs before, commit the changes and merge the pull request\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step3: add Codecov badge'\\ngit push origin step3\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nYou should see the badge appear on the repository screen in GitHub\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/90c0a5c-7.png\",\n \"7.png\",\n 186,\n 150,\n \"#1a1f20\"\n ]\n }\n ]\n}\n[/block]","order":3,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T16:17:04.714Z","createdAt":"2022-02-15T19:38:03.387Z","updatedAt":"2022-05-28T19:56:11.389Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"620c024e6bd12c007644427a","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"4a - Merging reports","updates":[],"type":"basic","slug":"step-4a-merging-reports","excerpt":"","body":"Another core feature of Codecov is our processing and merging of coverage reports. That means we take in any number of reports and aggregate them together, so you can see your coverage data in one view. Let’s see what that looks like.\n\n### Write a frontend\nPull the latest from `main` and create a new branch `step4`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git checkout main\\ngit pull\\ngit checkout -b 'step4'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nNext, we are going to build out a frontend for our calculator app. We are going to be adding a few files to the `web` directory. You can do so by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"mkdir -p web/static/css\\nmkdir -p web/static/js\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nfrom the root directory. Since there are multiple files, they are aggregated in tabs below\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"env\\\": {\\n \\\"test\\\": {\\n \\\"plugins\\\": [\\\"@babel/plugin-transform-modules-commonjs\\\"]\\n }\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"web/.babelrc\"\n },\n {\n \"code\": \"\\n\\n\\n \\n \\n Codecov Server-side Calculator App\\n \\n\\n\\n
\\n
\\n
123 +
\\n
456
\\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n\\n\",\n \"language\": \"html\",\n \"name\": \"web/index.html\"\n },\n {\n \"code\": \"{\\n \\\"name\\\": \\\"web\\\",\\n \\\"version\\\": \\\"1.0.0\\\",\\n \\\"description\\\": \\\"\\\",\\n \\\"scripts\\\": {\\n \\\"test\\\": \\\"jest --collectCoverage\\\",\\n \\\"build\\\": \\\"babel --plugins @babel/plugin-transform-modules-commonjs script.js\\\"\\n },\\n \\\"keywords\\\": [],\\n \\\"author\\\": \\\"\\\",\\n \\\"license\\\": \\\"MIT\\\",\\n \\\"dependencies\\\": {\\n \\\"axios\\\": \\\"^0.25.0\\\",\\n \\\"express\\\": \\\"^4.17.2\\\"\\n },\\n \\\"devDependencies\\\": {\\n \\\"@babel/plugin-transform-modules-commonjs\\\": \\\"^7.16.8\\\",\\n \\\"jest\\\": \\\"^27.4.7\\\"\\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"web/package.json\"\n },\n {\n \"code\": \"const axios = require('axios')\\nconst express = require(\\\"express\\\");\\nconst path = require(\\\"path\\\");\\n\\nconst app = express();\\n\\nconst backendHost = 'http://localhost';\\nconst backendPort = '8080';\\n\\napp.use(express.json());\\napp.use(\\\"/static\\\", express.static(path.resolve(__dirname, \\\"static\\\")));\\n\\napp.post(\\\"/api/:operation\\\", (req, res) => {\\n axios.post(\\n backendHost + ':' + backendPort + '/api/' + req.params['operation'],\\n req.body\\n ).then(response => {\\n res.json(response.data);\\n }).catch(error => {\\n console.log(\\\"Error: \\\" + error);\\n });\\n});\\n\\napp.get(\\\"/\\\", (req, res) => {\\n res.sendFile(path.resolve(\\\"index.html\\\"));\\n});\\napp.listen(process.env.PORT || 3000, () => console.log(\\\"Server running...\\\"));\",\n \"language\": \"javascript\",\n \"name\": \"web/server.js\"\n }\n ]\n}\n[/block]\nIn that `web/static` folder, you can add the following files\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"*, *::before, *::after {\\n box-sizing: border-box;\\n}\\n\\nbody {\\n margin: 0;\\n padding: 0;\\n background-color: #ccc;\\n}\\n\\n.calculator {\\n align-content: center;\\n display: grid;\\n grid-template-columns: repeat(4, 100px);\\n grid-template-rows: minmax(120px, auto) repeat(5, 100px);\\n justify-content: center;\\n min-height: 100vh;\\n}\\n\\n.calculator > button {\\n background-color: rbga(255, 255, 255, 0.75);\\n border: 1px solid #FFFFFF;\\n cursor: pointer;\\n font-size: 32px;\\n outline: none;\\n}\\n\\n.calculator > button:hover {\\n background-color: #aaaaaa;\\n}\\n\\n.span-3 {\\n grid-column: span 3;\\n}\\n\\n.disabled:hover {\\n background-color: rbga(255, 255, 255, 0.75);\\n cursor: not-allowed;\\n}\\n\\n.output{\\n align-items: flex-end;\\n background-color: rgba(0, 0, 0, 0.75);\\n display: flex;\\n flex-direction: column;\\n grid-column: 1 / -1;\\n justify-content: space-around;\\n padding: 10px;\\n word-break: break-all;\\n word-wrap: break-word;\\n}\\n\\n.output .previous-operand{\\n color: rgba(255,255, 255, 0.75);\\n}\\n\\n.output .current-operand{\\n color: white;\\n font-size: 42px;\\n}\",\n \"language\": \"css\",\n \"name\": \"web/static/css/calculator.css\"\n },\n {\n \"code\": \"export class Calculator {\\n constructor(previousOperandTextElement, currentOperandTextElement) {\\n this.previousOperandTextElement = previousOperandTextElement\\n this.currentOperandTextElement = currentOperandTextElement\\n this.clear()\\n }\\n\\n clear() {\\n this.currentOperand = ''\\n this.previousOperand = ''\\n this.operation = undefined\\n this.validOperand = true\\n }\\n\\n delete() {\\n this.currentOperand = this.currentOperand.toString().slice(0, -1)\\n }\\n\\n appendNumber(number) {\\n if (!this.validOperand) return\\n if (number === '.' && this.currentOperand.includes('.')) return\\n this.currentOperand = this.currentOperand.toString() + number.toString()\\n }\\n\\n chooseOperation(operation) {\\n if (!this.validOperand) return\\n if (this.currentOperand === '') return\\n if (this.previousOperand !== '') {\\n this.compute()\\n }\\n this.operation = operation\\n this.previousOperand = this.currentOperand\\n this.currentOperand = ''\\n }\\n\\n compute() {\\n if (!this.validOperand) {\\n return;\\n }\\n\\n const prev = parseFloat(this.previousOperand)\\n const current = parseFloat(this.currentOperand)\\n if (isNaN(prev) || isNaN(current)) return\\n\\n let operation\\n switch (this.operation) {\\n case '+':\\n operation = 'add'\\n break\\n case '-':\\n operation = 'subtract'\\n break\\n case '*':\\n operation = 'multiply'\\n break\\n case '÷':\\n operation = 'divide'\\n break\\n default:\\n return\\n }\\n this.callApi(operation)\\n }\\n\\n async callApi(operation) {\\n const response = await fetch(\\\"/api/\\\" + operation, {\\n method: 'POST',\\n headers: {\\n 'Accept': 'application/json',\\n 'Content-Type': 'application/json'\\n },\\n body: JSON.stringify({\\n x: this.previousOperand,\\n y: this.currentOperand\\n })\\n })\\n if (!response.ok) {\\n throw new Error(\\\"Error: \\\" + response.status);\\n }\\n this.currentOperand = await response.json();\\n this.operation = undefined;\\n this.previousOperand = '';\\n this.updateDisplay();\\n }\\n\\n getDisplayNumber(number) {\\n const stringNumber = number.toString()\\n const integerDigits = parseFloat(stringNumber.split('.')[0])\\n const decimalDigits = stringNumber.split('.')[1]\\n let integerDisplay\\n if (isNaN(integerDigits)) {\\n integerDisplay = stringNumber;\\n if (stringNumber.length > 0) {\\n this.validOperand = false;\\n }\\n } else {\\n integerDisplay = integerDigits.toLocaleString('en', { maximumFractionDigits: 0 })\\n }\\n if (decimalDigits != null) {\\n return `${integerDisplay}.${decimalDigits}`\\n } else {\\n return integerDisplay\\n }\\n }\\n\\n updateDisplay() {\\n this.currentOperandTextElement.innerText =\\n this.getDisplayNumber(this.currentOperand)\\n if (this.operation != null) {\\n this.previousOperandTextElement.innerText =\\n `${this.getDisplayNumber(this.previousOperand)} ${this.operation}`\\n } else {\\n this.previousOperandTextElement.innerText = ''\\n }\\n }\\n}\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculator.js\"\n },\n {\n \"code\": \"import { Calculator } from './calculator.js';\\n\\nconst numberButtons = document.querySelectorAll('[data-number]')\\nconst operationButtons = document.querySelectorAll('[data-operation]')\\nconst equalsButton = document.querySelector('[data-equals]')\\nconst allClearButton = document.querySelector('[data-all-clear]')\\nconst previousOperandTextElement = document.querySelector('[data-previous-operand]')\\nconst currentOperandTextElement = document.querySelector('[data-current-operand]')\\n\\nconst calculator = new Calculator(previousOperandTextElement, currentOperandTextElement)\\n\\nnumberButtons.forEach(button => {\\n button.addEventListener('click', () => {\\n calculator.appendNumber(button.innerText)\\n calculator.updateDisplay()\\n })\\n})\\n\\noperationButtons.forEach(button => {\\n button.addEventListener('click', () => {\\n calculator.chooseOperation(button.innerText)\\n calculator.updateDisplay()\\n })\\n})\\n\\nequalsButton.addEventListener('click', button => {\\n calculator.compute()\\n})\\n\\nallClearButton.addEventListener('click', button => {\\n calculator.clear()\\n calculator.updateDisplay()\\n})\\n\\ndocument.addEventListener('keydown', function (event) {\\n let patternForNumbers = /[0-9]/g;\\n let patternForOperators = /[+\\\\-*\\\\/]/g\\n if (event.key.match(patternForNumbers)) {\\n event.preventDefault();\\n calculator.appendNumber(event.key)\\n calculator.updateDisplay()\\n }\\n if (event.key === '.') {\\n event.preventDefault();\\n calculator.appendNumber(event.key)\\n calculator.updateDisplay()\\n }\\n if (event.key.match(patternForOperators)) {\\n event.preventDefault();\\n calculator.chooseOperation(event.key)\\n calculator.updateDisplay()\\n }\\n if (event.key === 'Enter' || event.key === '=') {\\n event.preventDefault();\\n calculator.compute()\\n }\\n});\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculatorView.js\"\n }\n ]\n}\n[/block]\nWe can test out our frontend by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"cd web\\nnpm install\\nnode server.js\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nBe sure to run the backend server as well in a different terminal.\nGo to `http://localhost:3000` to view the calculator\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/cacb481-1.png\",\n \"1.png\",\n 456,\n 698,\n \"#cacaca\"\n ]\n }\n ]\n}\n[/block]\nFeel free to play around with the interface.\n\n### Writing frontend tests\nLet’s now add tests to our `calculator.js` file\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"const calc = require('./calculator');\\n\\ndescribe('Calculator test suite', () => {\\n test('calculator clears', () => {\\n const calculator = new calc.Calculator();\\n calculator.clear();\\n\\n expect(calculator.currentOperand).toBe('');\\n expect(calculator.previousOperand).toBe('');\\n expect(calculator.operation).toBe(undefined);\\n expect(calculator.validOperand).toBe(true);\\n })\\n\\n test('calculator can input numbers', () => {\\n const calculator = new calc.Calculator();\\n calculator.appendNumber(1);\\n expect(calculator.currentOperand).toBe('1');\\n\\n calculator.appendNumber(2);\\n expect(calculator.currentOperand).toBe('12');\\n })\\n\\n test('calculator can deletes', () => {\\n const calculator = new calc.Calculator();\\n calculator.appendNumber(1);\\n expect(calculator.currentOperand).toBe('1');\\n\\n calculator.appendNumber(2);\\n expect(calculator.currentOperand).toBe('12');\\n\\n calculator.delete();\\n expect(calculator.currentOperand).toBe('1');\\n })\\n})\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculator.test.js\"\n }\n ]\n}\n[/block]\n### Run the tests\nWe can run tests locally with the following command\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"npm run test\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nand we should see the following output\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"PASS static/js/calculator.test.js\\n Calculator test suite\\n ✓ calculator clears (3 ms)\\n ✓ calculator can input numbers\\n ✓ calculator can deletes\\n\\n---------------|---------|----------|---------|---------|-------------------\\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s\\n---------------|---------|----------|---------|---------|-------------------\\nAll files | 18.03 | 9.09 | 44.44 | 19.64 |\\n calculator.js | 18.03 | 9.09 | 44.44 | 19.64 | 26-113\\n---------------|---------|----------|---------|---------|-------------------\\nTest Suites: 1 passed, 1 total\\nTests: 3 passed, 3 total\\nSnapshots: 0 total\\nTime: 0.967 s\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### Add a frontend CI workflow\nLet’s add a workflow to run our frontend tests\n\n#### GitHub Actions\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"name: Frontend workflow\\n\\non: [push, pull_request]\\n\\njobs:\\n build:\\n runs-on: ubuntu-latest\\n name: Test JS frontend\\n defaults:\\n run:\\n working-directory: ./web\\n steps:\\n - uses: actions/checkout@v1\\n - uses: actions/setup-node@v2\\n with:\\n node-version: '16'\\n - name: Install requirements\\n run: npm install\\n - name: Run tests and collect coverage\\n run: npm run test\\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v2\",\n \"language\": \"yaml\",\n \"name\": \".gihtub/workflows/frontend.yml\"\n }\n ]\n}\n[/block]\n#### CircleCI\n`...` is used to demark previous code, be sure add in the applicable lines in the appropriate areas.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"jobs:\\n ...\\n test-frontend:\\n docker:\\n - image: cimg/node:17.6.0\\n steps:\\n - checkout\\n - run:\\n name: Install requirements\\n command: cd web && npm install\\n - run:\\n name: Run tests and collect coverage\\n command: cd web && npm run test\\n - codecov/upload\\n\\nworkflows:\\n ...\\n build-test:\\n jobs:\\n ...\\n - test-frontend\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n }\n ]\n}\n[/block]\nThis workflow does a similar set of steps as our API workflow. If we commit this code,\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"cd .. # back to the root directory\\ngit add .\\ngit commit -m 'step4: add frontend and tests'\\ngit push origin step4\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nand open a PR, we see that our code coverage has greatly decreased! With the addition of the new, but poorly tested frontend, our status checks fail.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/889d721-2.png\",\n \"2.png\",\n 916,\n 464,\n \"#1b1e23\"\n ]\n }\n ]\n}\n[/block]\nWe also see that in the Codecov comment.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/573d0a5-3.png\",\n \"3.png\",\n 787,\n 710,\n \"#29322c\"\n ]\n }\n ]\n}\n[/block]\nWe see this type of situation happen all the time. For example, some projects in a monorepository might be starting code coverage for the first time, while other parts have been using Codecov for months or years. Adding code coverage like this can greatly decrease the percentage for the whole project.\n\nHowever, what you may not have noticed is that Codecov automatically merges coverage reports together, regardless of the language or CI workflow. This happens under the hood and requires no additional configuration from you.\n\nIn the next section, we'll show you how to use [Codecov Flags](doc:flags) to help group coverage reports and to set different coverage standards for different parts of your project.","order":4,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"step-4-merging-reports-and-codecov-flags","slugUpdatedAt":"2022-03-05T06:32:52.393Z","createdAt":"2022-02-15T19:43:10.529Z","updatedAt":"2022-05-24T20:45:14.882Z","user":"5b47e58599e0430003d8e823","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"6222f5d241980900ac6575d5","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"4b - Setting coverage standards with Flags","updates":[],"type":"basic","slug":"step-4b-setting-coverage-standards-with-flags","excerpt":"","body":"Codecov’s [Flags](​​https://docs.codecov.com/docs/flags) helps this situation by grouping coverage reports by function. Let’s set up flags in our example so that we can simulate an instance where the backend is well-tested and wants to maintain high code coverage, while the frontend is new and only expected to increase with each new commit.\n\n### Add flags to the Codecov configuration\n**Re-write** the `codecov.yml` file with the below\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project: off\\n patch: off\\n\\nflag_management:\\n individual_flags:\\n - name: backend\\n paths:\\n - api/\\n statuses:\\n - type: project\\n target: 100%\\n threshold: 1%\\n - name: frontend\\n paths:\\n - web/\\n statuses:\\n - type: project\\n target: auto\\n threshold: 1%\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nNotice that we are creating two flags `backend` and `frontend` that encompass the `api` and `web` directories, respectively. The `backend` flag will target 100% overall coverage, while the `frontend` flag is set to `auto`. This means that every new commit must maintain or raise the overall code coverage of the project.\n\n### Update the uploader call with flags\nUpdate the workflows to send the proper flag with each coverage report\n\n#### GitHub Actions\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"... \\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v2\\n with:\\n flags: backend\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/api.yml\"\n },\n {\n \"code\": \"...\\n - name: Upload coverage reports to Codecov with GitHub Action\\n uses: codecov/codecov-action@v2\\n with:\\n flags: frontend\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/frontend.yml\"\n }\n ]\n}\n[/block]\n#### CircleCI\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"jobs:\\n test-api:\\n ...\\n - codecov/upload:\\n flags: backend\\n test-frontend:\\n ...\\n - codecov/upload:\\n flags: frontend\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n }\n ]\n}\n[/block]\nCommit your changes and push them to GitHub\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step4: add Codecov Flags'\\ngit push origin step4\",\n \"language\": \"shell\",\n \"name\": null\n }\n ]\n}\n[/block]\nNow you see 4 status checks from Codecov that are passing.\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/2bc6b63-4.png\",\n \"4.png\",\n 821,\n 429,\n \"#1b2125\"\n ]\n }\n ]\n}\n[/block]","order":5,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"5-setting-coverage-standards-with-flags","slugUpdatedAt":"2022-03-05T06:33:03.402Z","createdAt":"2022-03-05T05:32:02.134Z","updatedAt":"2022-03-08T22:53:05.755Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0},{"_id":"620c029aa3d4d000a921897d","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"5 - Test what you change with Carryforward Flags","updates":[],"type":"basic","slug":"step-5-carryforward-flags","excerpt":"","body":"Although Flags can help separate out different test suites, not every project will run the entire test suite for every commit. Carryforward Flags can be used here to maintain consistent coverage values.\n\n### Update CI workflows to run on applicable changes\nPull the latest from `main` and create a new branch `step5`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git checkout main\\ngit pull\\ngit checkout -b 'step5'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nLet’s set up our demo repository to only run workflows if the affected code is changed. \n\n#### GitHub Actions\nEdit the `on:` section of both workflows\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"...\\non:\\n push:\\n paths:\\n - 'api/**'\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/api.yml\"\n },\n {\n \"code\": \"...\\non:\\n push:\\n paths:\\n - 'web/**'\",\n \"language\": \"yaml\",\n \"name\": \".github/workflows/frontend.yml\"\n }\n ]\n}\n[/block]\n#### CircleCI\nRunning jobs based on files changed in a directory requires CircleCI's [path-filtering orb](https://circleci.com/developer/orbs/orb/circleci/path-filtering) and [dynamic config](https://circleci.com/docs/2.0/dynamic-config/#getting-started-with-dynamic-config-in-circleci). \n\nDue to [this issue](https://rdmd.readme.io/docs/features#known-issues), be sure to replace `<>` and `<>` with \\<> and \\<> , respectively.\n\n**You will need to [enable dynamic config](https://circleci.com/docs/2.0/dynamic-config/#getting-started-with-dynamic-config-in-circleci).**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: 2.1\\n\\nsetup: true\\n\\norbs:\\n path-filtering: circleci/path-filtering@0.1.1\\n\\nworkflows:\\n jobs:\\n - path-filtering/filter:\\n mapping: |\\n api/.* test-api-job true\\n web/.* test-frontend-job true\",\n \"language\": \"yaml\",\n \"name\": \".circleci/config.yml\"\n },\n {\n \"code\": \"version: 2.1\\n\\norbs:\\n codecov: codecov/codecov@3.2.2\\n\\nparameters:\\n test-api-job:\\n type: boolean\\n default: false\\n test-frontend-job:\\n type: boolean\\n default: false\\n\\njobs:\\n test-api:\\n docker:\\n - image: cimg/python:3.10.2\\n name: Install requirements\\n command: pip install -r api/requirements.txt\\n - run:\\n name: Run tests and collect coverage\\n command: pytest --cov --cov-report xml .\\n - codecov/upload:\\n flags: backend\\n test-frontend:\\n docker:\\n - image: cimg/node:17.6.0\\n steps:\\n - checkout\\n - run:\\n name: Install requirements\\n command: cd web && npm install\\n - run:\\n name: Run tests and collect coverage\\n command: cd web && npm run test\\n - codecov/upload:\\n flags: frontend\\n\\nworkflows:\\n test-api-workflow:\\n when: << pipeline.parameters.test-api-job >>\\n jobs:\\n - test-api\\n test-frontend-workflow:\\n when: << pipeline.parameters.test-frontend-job >>\\n jobs:\\n - test-frontend\",\n \"language\": \"yaml\",\n \"name\": \".circleci/continue_config.yml\"\n }\n ]\n}\n[/block]\nNow, if we make a change to only code in the `web` directory, the `frontend` workflow will run.\n\n### Add coverage to the frontend\nLet’s add a test to our calculator.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"...\\n test('test operation', () => {\\n const calculator = new calc.Calculator();\\n calculator.chooseOperation('+');\\n expect(calculator.operation).toBeUndefined();\\n\\n calculator.appendNumber(1);\\n calculator.appendNumber(2);\\n calculator.chooseOperation('+');\\n expect(calculator.currentOperand).toBe('');\\n expect(calculator.operation).toBe('+');\\n expect(calculator.previousOperand).toBe('12');\\n\\n calculator.appendNumber(3);\\n calculator.appendNumber(4);\\n expect(calculator.currentOperand).toBe('34');\\n expect(calculator.operation).toBe('+');\\n expect(calculator.previousOperand).toBe('12');\\n })\\n...\",\n \"language\": \"javascript\",\n \"name\": \"web/static/js/calculator.test.js\"\n }\n ]\n}\n[/block]\nRun `cd web && npm run test` to ensure that the test has been added in correctly.\n\n### Turn Flags into Carryforward Flags\nFinally, we will need to make a change to our `codecov.yml` file to ensure that Flags are marked as Carryforward.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"...\\nflag_management:\\n default_rules:\\n carryforward: true\\n...\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nCommit and push your changes to GitHub.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"git add .\\ngit commit -m 'step5: add Carryforward Flags'\\ngit push origin step5\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nNotice that only the `frontend` workflow runs. In the `Flag` section of the Codecov comment, you will only see the `frontend` Flag.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f3e8e13-5.png\",\n \"5.png\",\n 832,\n 766,\n \"#292724\"\n ]\n }\n ]\n}\n[/block]\n### Conclusion\nAt this point, you have worked through the major features of Codecov. From here, you can explore other advanced aspects of the product.\n\n- [More yaml configuration](https://docs.codecov.com/docs/codecovyml-reference)\n- [In-line coverage on GitHub](https://docs.codecov.com/docs/github-checks)\n- [Sourcegraph browser extension](https://docs.codecov.com/docs/browser-extension)","order":6,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T16:17:04.724Z","createdAt":"2022-02-15T19:44:26.833Z","updatedAt":"2022-03-08T23:35:06.643Z","user":"5a5f7365678e1d0012d7cbd8","parentDoc":"620bfe17eb5a2f003fde078b","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0}]},{"_id":"620d26aa34a35e00947b9510","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"[Video Guide] Connecting Codecov to Github","updates":[],"type":"basic","slug":"video-guide-connecting-codecov-to-github","excerpt":"For Github users looking to connect Codecov to their Github account","body":"For Codecov to fully function with Github, there are two layers of connection needed:\n\n**1. A CONNECTED, INDIVIDUAL ACCOUNT ON AN APPROVED GITHUB ORGANIZATION: \n**\nCodecov uses the [GitHub OAuth Application](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps) flow to authenticate users when they login to Codecov using GitHub. \n\nFor Codecov to be able to publish comments on the pull request as well as decorate your code with coverage data, the minimum user level access in Github is \"write access.\" \n\n\n**2. A DEDICATED CONNECTION POINT BETWEEN YOUR GITHUB ORGANIZATION AND CODECOV\n**\n\nThere are two options for Organization Level connection:\n\na.) (Recommended) The Github App connection, which connects between your Github Organization and the Codecov App on Github, found here: [https://github.com/apps/codecov](https://github.com/apps/codecov) \nOR \nB.) Using a [Team Bot](doc:team-bot) with Oauth access (e.g., user-level connection). \n\n\n\n**This video guide demonstrates step 1: User-level connection\n**\n\n\n[block:api-header]\n{\n \"title\": \"Step 1: Account Creation\"\n}\n[/block]\n\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=8xToLcchs4Y\",\n \"title\": \"Codecov Onboarding 1: Account Creation\",\n \"favicon\": \"https://www.youtube.com/s/desktop/5bf1652c/img/favicon.ico\",\n \"image\": \"https://i.ytimg.com/vi/8xToLcchs4Y/hqdefault.jpg\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Step 2: Admin Access\"\n}\n[/block]\nIf you are signing up via GitHub, you may need to request access from an admin to authorize Codecov as a third-party application. An admin can approve this request in the \"Third-party access\" tab in the organization's settings page:\n\nhttps://github.com/organizations/[YOUR_ORG_NAME]/settings/oauth_application_policy.\n\nFor more information and screenshots on this process, please visit [GitHub OAuth Admin Authorization](doc:doc:github-oauth-application-authorization)\n\n\n**Here is what your Github Administrator will see to enable you**\n\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=tUgSW8KLpZo\",\n \"title\": \"Codecov Onboarding 2: Admin Access\",\n \"favicon\": \"https://www.youtube.com/s/desktop/5bf1652c/img/favicon.ico\",\n \"image\": \"https://i.ytimg.com/vi/tUgSW8KLpZo/hqdefault.jpg\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Step 3: Granting Private Scope\"\n}\n[/block]\nIf you are using Codecov with one or more private repos, you will also need to grant Codecov Private scope.\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=cxHRBtiXuqc\",\n \"title\": \"Onboarding Codecov 3: Granting Private Scope\",\n \"favicon\": \"https://www.youtube.com/s/desktop/5bf1652c/img/favicon.ico\",\n \"image\": \"https://i.ytimg.com/vi/cxHRBtiXuqc/hqdefault.jpg\"\n}\n[/block]","order":6,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2022-02-15T21:03:29.551Z","createdAt":"2022-02-16T16:30:34.528Z","updatedAt":"2022-02-17T13:45:13.338Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f0008027253d","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":null,"children":[],"childrenPages":[]}]},{"_id":"605e107fa1b4710022622bb9","title":"Concepts","slug":"concepts","order":1,"reference":false,"isAPI":false,"project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","createdAt":"2021-03-26T16:49:03.885Z","__v":0,"pages":[{"_id":"604a3fa3d6d5f00080272546","excerpt":"This is how Codecov determines the code coverage reports to compare and display the amount of coverage change from commit to commit on the Git tree.","isReference":false,"updates":["58add0a44b3e0b0f00e1bc7d","5adbaf789878d600037db57f","5adbaf7a0ae8210003b03154","5c6b228657bf8c02540206d0","604a2a9775282900258c4f50"],"user":"5b47e58599e0430003d8e823","body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Choosing a parent commit\"\n}\n[/block]\nCodecov must choose a parent commit when comparing coverage reports. Having accurate coverage data is crucial. Therefore, by default, **Codecov only chooses commits that have successful CI builds. **\n\nTo illustrate this point, we can review the following commits:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/23f71b3-Screen_Shot_2017-01-15_at_3.52.43_PM.png\",\n \"Screen Shot 2017-01-15 at 3.52.43 PM.png\",\n 2158,\n 490,\n \"#dae2e8\"\n ],\n \"caption\": \"Note: `A` is the oldest commit and `D` is the newest.\"\n }\n ]\n}\n[/block]\n### Order of events\n\n- Commit `A` was uploaded. The CI passed for this commit. Coverage did not change.\n- Commit `B` was uploaded. The CI failed.\n- Commit `C` was uploaded. The CI failed.\n- Commit `D` was uploaded. The CI passed and coverage increased.\n\nCodecov will compare `A` against `D` because commits `B` and `C` failed in CI, and likely have invalid or incomplete coverage data. This results in a `+2%` change in coverage.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Commits with Failed CI\"\n}\n[/block]\nWhen coverage runs on your build, it is essential that Codecov recognizes that CI has passed or failed. If CI fails, one or more of the following assumptions can be made:\n\n1. Not all tests were executed; therefore coverage is incomplete.\n2. Exceptions may call new execution paths, resulting in different coverage metrics.\n3. A failed test could produce different coverage than the same test ran successfully.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Rebase vs Merge Target\"\n}\n[/block]\nThere are two techniques to updating pull requests: rebasing and merging target.\n\n**Both** techniques are respected by Codecov. The pull request base will be updated from `a` to `b`, and Codecov will use reports from `b` when comparing against pull request head (`c`).\n\n### Rebasing\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# git diagram - before\\n```\\nmaster a . . b\\npull \\\\ . . c\\n```\\n\\n# rebase action\\ngit rebase master\\n\\n# git diagram - after\\n```\\nmaster a . . b\\npull \\\\ . . c\\n```\",\n \"language\": \"markdown\"\n }\n ]\n}\n[/block]\n### Merging Target\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# git diagram - before\\n```\\nmaster a . . b\\npull \\\\ . . c\\n```\\n\\n# merging target action\\ngit merge master\\n\\n# git diagram - after\\n```\\nmaster a . . b\\n \\\\\\npull \\\\ . . . mc c\\n```\",\n \"language\": \"markdown\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Comparing pull request base reports\"\n}\n[/block]\n### Pseudo-Comparison\n\nWhen Codecov generates a comparison for a pull-request, but the pull-request’s base in git does not have coverage information, Codecov will try to find an appropriate substitute (a “pseudo-base”). This is referred to as pseudo-comparison. Pseudo-comparison can be turned off via the Codecov YAML option:\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n allow_pseudo_compare: False\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\nThe default is True. When pseudo-comparison is disallowed, and the base commit of a PR has no coverage data, Codecov will render an error in the UI.\n\n\n**Coverage Offsets**\nSometimes the pseudo-base chosen by Codecov will not be recent enough to directly substitute for the base commit of a pull-request. In this case, Codecov will try to use the diff between the pseudo-base and the true base to adjust the coverage information of the pseudo-base and account for recent changes. This feature of applying “coverage offsets” to the pseudo-base’s coverage report can also be configured by the Codecov YAML:\n\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n allow_coverage_offsets: True\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nThe default is False. If Codecov is configured to pseudo-compare when coverage is missing for a base commit, but not to apply coverage offsets when the pseudo-base is too old for direct substitution for the base commit, Codecov will render an error in the UI.\n\n### Pseudo-Comparison Example\n\nThe base commit of the pull request did not upload coverage resulting in Codecov not able to compare reports.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"master . pseudo . . base\\npull \\\\ . . head\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n- `pseudo` did upload coverage\n- `base` **did not** upload coverage\n- `head` did upload coverage\n\nExamples of the use cases:\n- Base commit skipped CI via `[ci skip]`, use the parent commit as the pseudo commit below.\n- Base commit was a merge commit `Merge abc into xyz`, use `xyz` as the pseudo commit below.\n\nCodecov will seek a parent commit and offset the report to get an approximate base report.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# first get the git diff of pseudo...base\\npseudo_diff_base = diff(pseudo...base)\\n\\n# check if you allow offsets (default False)\\nif yaml[\\\"codecov.allow_coverage_offsets\\\"] is False\\n if pseudo_diff_base.adjusts_tracked_lines(pseudo.report)\\n exit \\\"Missing report base\\\"\\n\\n# adjust the report with changes in pseudo_diff_base\\napprox_base_report = pseudo.report.adjust_forward(pseudo_diff_base)\\n\\n# get the pull diff\\npull_diff = diff(base...head)\\n\\nuse compare(approx_base_report...head.report) in pull comment/statuses/etc.\\n\",\n \"language\": \"python\",\n \"name\": null\n }\n ]\n}\n[/block]","category":"605e107fa1b4710022622bb9","createdAt":"2016-08-17T17:44:23.751Z","link_external":false,"next":{"pages":[],"description":""},"order":0,"title":"Comparing Coverage Across Commits","type":"basic","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"hidden":false,"link_url":"","parentDoc":null,"project":"57b33b5ec9a4551700b969a5","slug":"comparing-commits","sync_unique":"","__v":5,"version":"604a3fa3d6d5f0008027258e","githubsync":"","updatedAt":"2021-09-02T13:44:26.175Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-03-10T21:33:59.313Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272549","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"language":"json","status":400,"name":"","code":"{}"}]},"settings":"","method":"get"},"body":"Codecov, like other static analysis tools, is an important step in the modern developers workflow.\n\nCodecov **does not** run your test suite. That is the job of the [CI Provider](doc:supported-ci-providers). Codecov gathers coverage reports and other key data for static analysis. \n\nCodecov does not have any special arrangements with CI providers. We work with all providers as much as possible to create an easy and seamless integration with all the CI providers.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Checking CI status\"\n}\n[/block]\nCodecov checks all your CI statuses on every commit to make sure the coverage results are accurate. This process is very important to the inner working of Codecov and data accuracy.\n\n#### If CI is pending, then the coverage results...\n1. may be incomplete as there could be more uploads to Codecov for this commit;\n2. should not be used to compare with other commits, as the results may not be complete.\n\n#### If CI fails, then the coverage results are...\n1. not complete because not all tests were executed;\n2. invalid because different execution paths were taken due to exceptions and failed tests;\n3. not representing a successful CI test case, and comparing reports would almost certainly lead to inaccurate results.\n\n#### If CI passes, then the coverage results are...\n1. merged and accurate;\n2. able to be compared to previous commits;\n3. sent to all notifications (Slack, etc.) once all reports are processed and merged.","createdAt":"2016-08-17T17:57:54.281Z","hidden":false,"link_url":"","sync_unique":"","title":"CI Provider Relationship","type":"basic","user":"5b47e58599e0430003d8e823","excerpt":"The role of CI and Codecov","isReference":false,"link_external":false,"__v":2,"order":1,"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","updates":["58add69375df0f1b001ed6c5","6222b5ec0906750014e31829"],"category":"605e107fa1b4710022622bb9","githubsync":"","next":{"description":"- [Detect custom CI providers](https://docs.codecov.io/docs/detecting-ci-services)\n- Enterprise: [Add custom CI provider domains](Enterprise: [Setup custom CI providers](https://docs.codecov.io/docs/configuration#section-add-custom-ci-domains)\n)","pages":[]},"slug":"ci-service-relationship","version":"604a3fa3d6d5f0008027258e","updatedAt":"2020-08-07T18:38:26.550Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"deprecated":false,"previousSlug":"","slugUpdatedAt":"2022-03-04T19:23:17.265Z","children":[],"childrenPages":[]},{"_id":"60d605629e8f3600475dbcfe","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Codecov Uploader","updates":["60d6418ff64ab70077351f8c","60fa2d650aabd40022a368cd","61702672ee3ecf0029e89c5c","618a993df2e8ed02f7923f85","61fc73d22d6bde00431010cd"],"type":"basic","slug":"codecov-uploader","excerpt":"","body":"[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nCodecov uses a separate upload tool to make it easy to upload coverage reports to Codecov for processing. \n\nThe Codecov Uploader is a statically compiled binary distribution with releases for Linux, Alpine Linux, macOS, and Windows. \n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"Instead of following the steps below, you can alternatively use a build pipeline-specific wrapper to the uploader to automatically ingest and run the uploader:\\n\\n[Codecov's Github Action v2](https://github.com/marketplace/actions/codecov)\\n[Codecov's CircleCI Orb](https://circleci.com/developer/orbs/orb/codecov/codecov) \\n[Codecov's Bitrise Step](https://devcenter.bitrise.io/en/testing/measuring-your-code-coverage-with-codecov.html#integrating-codecov-with-bitrise)\",\n \"title\": \"Dedicated wrappers for the Codecov Uploader\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Using the Uploader\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"In case of unexpected behavior (such as \\\"no output in the CI\\\")\",\n \"body\": \"Please try to run **unset NODE_OPTIONS** before running the uploader. This issue is outlined here, and we are working on resolving this ASAP.\\n \\n[https://github.com/codecov/uploader/issues/475](https://github.com/codecov/uploader/issues/475)\\n\\nNote: you may also use the -Z param to force non-zero exit code.\"\n}\n[/block]\n### Using the Uploader with codecov.io (Cloud)\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"It is Highly Recommended to Integrity Check the Uploader\",\n \"body\": \"While the snippets below can be used to download and use the uploader directly, it is highly recommended to perform signature and SHASUM verification to ensure integrity of the Uploader before use. See **[Integrity Checking the Uploader](doc:codecov-uploader#integrity-checking-the-uploader)** below for more information.\"\n}\n[/block]\nFor Codecov Cloud users, the Uploader can be invoked as follows: \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -Os https://uploader.codecov.io/latest/linux/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"Linux\"\n },\n {\n \"code\": \"curl -Os https://uploader.codecov.io/latest/alpine/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"Alpine Linux\"\n },\n {\n \"code\": \"curl -Os https://uploader.codecov.io/latest/macos/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"macOS\"\n },\n {\n \"code\": \"$ProgressPreference = 'SilentlyContinue'\\nInvoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe \\n-Outfile codecov.exe\\n .\\\\codecov.exe -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"Windows\"\n }\n ]\n}\n[/block]\nThe above commands will download the latest version of the Uploader. If you wish to use a specific version of the Uploader, releases can be viewed per distribution here:[ https://uploader.codecov.io/](https://uploader.codecov.io/) .\n\nPinning to a particular version requires replacing \"latest\" in the curl command with the specific version numbers, as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -Os https://uploader.codecov.io/v0.1.0_4653/linux/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"Linux\"\n }\n ]\n}\n[/block]\n### Self-Hosted Use of the Uploader\n\nNote that for Codecov Self-Hosted the Self-Hosted URL will need to be included in the upload command. An example using the Alpine uploader is as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -Os https:///uploader/linux/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN} --url https://\",\n \"language\": \"text\",\n \"name\": \"Linux\"\n },\n {\n \"code\": \"curl -Os https:///uploader/alpine/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN} --url https://\",\n \"language\": \"text\",\n \"name\": \"Alpine Linux\"\n },\n {\n \"code\": \"curl -Os https:///uploader/macos/codecov\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN} --url https://\",\n \"language\": \"text\",\n \"name\": \"macOS\"\n },\n {\n \"code\": \"$ProgressPreference = 'SilentlyContinue'\\nInvoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe \\n-Outfile codecov.exe\\n .\\\\codecov.exe -t ${CODECOV_TOKEN} --url https://\",\n \"language\": \"text\",\n \"name\": \"Windows\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Upload Token\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Not required for some public uploaders\",\n \"body\": \"If you have a **public** project on TravisCI, CircleCI, AppVeyor, Azure Pipelines, or GitHub Actions an upload token is not required.\"\n}\n[/block]\nA unique upload token is required to identify which project the coverage belongs to. This token is located in the repository settings (////settings).\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/07e8938-Codecov_Upload_Token.png\",\n \"Codecov Upload Token.png\",\n 2730,\n 1074,\n \"#fafafa\"\n ],\n \"caption\": \"A repository on codecov with no uploaded coverage reports. Note the upload token.\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Integrity Checking the Uploader\"\n}\n[/block]\nThe new Uploader can be integrity checked against a known GPG key signature, and can also have its contents checked via SHASUM. While performing these two checks is optional, it is highly recommended to do so. By checking the GPG signature and the SHASUM of the uploader, users can be much more confident in the overall integrity of the downloaded file. \n\nAt a high level, to integrity check the new Uploader, one must:\n\n1. Import the Codecov PGP public key (one-time step). The Codecov PGP public key can be retrieved from Keybase or many other keyservers. Key ID: `ED779869` Key Fingerprint: `2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869`\n2. Download the Uploader, SHA256SUM, and SHA256SUM.sig files for your particular distribution\n3. Verify the SHA256SUM file is signed using Codecov’s PGP key\n4. Verify the SHA256SUM in the file matches the Uploader\n\nThe following example performs these steps for each distribution of the Uploader's latest version before using the Uploader to upload a coverage report:\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Alpine Linux may Require Additional Dependencies\",\n \"body\": \"If the following commands fail when using Alpine Linux, you may need to run: `apk add curl gnupg coreutils`\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Windows may Require Additional Dependencies\",\n \"body\": \"If `gpg.exe` is not already installed on your system, you can download the Windows GPG client from: https://gnupg.org/download/\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step\\n\\ncurl -Os https://uploader.codecov.io/latest/linux/codecov\\n\\ncurl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM\\n\\ncurl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig\\n\\ngpgv codecov.SHA256SUM.sig codecov.SHA256SUM\\n\\nshasum -a 256 -c codecov.SHA256SUM\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"Linux\"\n },\n {\n \"code\": \"curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step\\n\\ncurl -Os https://uploader.codecov.io/latest/alpine/codecov\\n\\ncurl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM\\n\\ncurl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM.sig\\n\\ngpgv codecov.SHA256SUM.sig codecov.SHA256SUM\\n\\nshasum -a 256 -c codecov.SHA256SUM\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"Alpine Linux\"\n },\n {\n \"code\": \"curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step\\n\\ncurl -Os https://uploader.codecov.io/latest/macos/codecov\\n\\ncurl -Os https://uploader.codecov.io/latest/macos/codecov.SHA256SUM\\n\\ncurl -Os https://uploader.codecov.io/latest/macos/codecov.SHA256SUM.sig\\n\\ngpgv codecov.SHA256SUM.sig codecov.SHA256SUM\\n\\nshasum -a 256 -c codecov.SHA256SUM\\n\\nchmod +x codecov\\n./codecov -t ${CODECOV_TOKEN}\",\n \"language\": \"text\",\n \"name\": \"macOS\"\n },\n {\n \"code\": \"$ProgressPreference = 'SilentlyContinue'\\nInvoke-WebRequest -Uri https://keybase.io/codecovsecurity/pgp_keys.asc -OutFile codecov.asc \\ngpg.exe --import codecov.asc\\n\\nInvoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe\\nInvoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM -Outfile codecov.exe.SHA256SUM\\nInvoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig\\n\\ngpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM\\nIf ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], \\\"codecov.exe\\\") -join \\\" \\\") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) { echo \\\"SHASUM verified\\\" } Else {exit 1}\",\n \"language\": \"text\",\n \"name\": \"Windows\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Fetching Version Specific Metadata\"\n}\n[/block]\nMetadata can be fetched for a particular release of the Uploader (including `latest`) as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -H \\\"Accept: application/json\\\" https://uploader.codecov.io/alpine/latest | jq\",\n \"language\": \"curl\"\n }\n ]\n}\n[/block]\nWhich will return a JSON response of the following form:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"artifact\\\": {\\n \\\"distro\\\": \\\"alpine\\\",\\n \\\"created_at\\\": \\\"2021-08-24 20:58:19\\\",\\n \\\"hash\\\": \\\"da09663c04204d349dd26a2e0c2e48e5058429e445602b7961872693a044e17e\\\",\\n \\\"file\\\": \\\"codecov-alpine\\\",\\n \\\"version\\\": \\\"v0.1.0_8880\\\"\\n },\\n \\\"link\\\": \\\"https://uploader.codecov.io/v0.1.0_8880/alpine/codecov\\\",\\n \\\"file_hash_link\\\": \\\"https://uploader.codecov.io/v0.1.0_8880/alpine/codecov.SHA256SUM\\\",\\n \\\"file_sig_link\\\": \\\"https://uploader.codecov.io/v0.1.0_8880/alpine/codecov.SHA256SUM.sig\\\",\\n \\\"github_release_link\\\": \\\"https://github.com/codecov/uploader/releases/tag/v0.1.0_8880\\\",\\n \\\"hash\\\": \\\"da09663c04204d349dd26a2e0c2e48e5058429e445602b7961872693a044e17e\\\",\\n \\\"version\\\": \\\"v0.1.0_8880\\\"\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\nThe response contains meta information about the particular version in the `artifact` object, include the distro and the commit SHA of the release, located at https://github.com/codecov/uploader. Links to distributions of the particular version are also provided. \n\nWhile this is generally useful, the most obvious use case is leveraging this metadata to setup a vendoring pipeline that fetches and verifies `latest` whenever it updates and stores this verified version of the uploader in an private CDN, filestore, or other storage apparatus.\n[block:api-header]\n{\n \"title\": \"Uploader Command Line Arguments\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Argument\",\n \"h-1\": \"Usage\",\n \"0-1\": \"Specify the branch manually. Used to override pre-existing CI environment variables\",\n \"1-1\": \"Specify the build number manually. Used to override pre-existing CI environment variables\",\n \"2-1\": \"Move discovered coverage reports to the trash [boolean] [default: false]\",\n \"3-1\": \"Specify the commit SHA mannually. **Please use the long version** to ensure a match between the submitted SHA and the git provider's API response.\\nUsed to override pre-existing CI environment variables\",\n \"8-1\": \"Run with gcov support\\n[boolean] [default: false]\",\n \"9-1\": \"Extra arguments to pass to gcov\\n[string]\",\n \"10-1\": \"Paths to ignore during gcov gathering [string]\",\n \"12-1\": \"Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing\\n[string]\",\n \"13-1\": \"Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing\\n[string]\",\n \"14-1\": \"Custom defined name of the upload. Visible in Codecov UI\\n[default: \\\"\\\"]\",\n \"15-1\": \"The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository provider's API, the parent is determined via finding the closest ancestor to the commit.\",\n \"16-1\": \"Specify the pull request number mannually. Used to override pre-existing CI environment variables\",\n \"26-0\": \"** Self-hosted Enterprise **\",\n \"27-1\": \"owner/repo slug used instead of the private repo token in Self-hosted\\n(option) set environment variable `CODECOV_SLUG=:owner/:repo`\\n(option) set in your `codecov.yml` `\\\"codecov.slug\\\"`\",\n \"28-1\": \"Set the target url for Self-hosted customers\\n(option) Set environment variable `CODECOV_URL=https://my-hosted-codecov.com`\",\n \"0-0\": \"-B, --branch\",\n \"1-0\": \"-b, --build\",\n \"2-0\": \"-c, --clean\",\n \"3-0\": \"-C, --sha\",\n \"8-0\": \"-g, --gcov\",\n \"9-0\": \"--gcovArgs, --ga\",\n \"10-0\": \"--gcovIgnore, --gi\",\n \"11-1\": \"Paths to include during gcov gathering [string]\",\n \"11-0\": \"--gcovInclude, --gI\",\n \"12-0\": \"-i, --networkFiler\",\n \"13-0\": \"-k, --networkPrefix\",\n \"14-0\": \"-n, --name\",\n \"15-0\": \"-N, --parent\",\n \"16-0\": \"-P, --pr\",\n \"17-1\": \"Used internally by Codecov, this argument helps track wrappers of the uploader (e.g. GitHub Action, CircleCI Orb)\\n[string] [default: \\\"\\\"]\",\n \"17-0\": \"-Q, --source\",\n \"27-0\": \"`-r SLUG`\",\n \"28-0\": \"`-u URL`\",\n \"4-0\": \"-d, --dryRun\",\n \"5-0\": \"-e, --env\",\n \"6-0\": \"-f, --file\",\n \"7-0\": \"-F, --flags\",\n \"4-1\": \"Don't upload files to Codecov [boolean] [default: false]\",\n \"5-1\": \"Specify environment variables to be included with this build.\\nAlso accepting environment variables: CODECOV_ENV=VAR,VAR2\",\n \"6-1\": \"Target file(s) to upload\",\n \"7-1\": \"Flag the upload to group coverage metrics [default: \\\"\\\"]\",\n \"18-0\": \"-R, --rootDir\",\n \"18-1\": \"Specify the project root directory when not in a git repo\",\n \"19-0\": \"-s, --dir\",\n \"19-1\": \"Directory to search for coverage reports. Already searches project root and current working directory\",\n \"20-0\": \"-T, --tag\",\n \"20-1\": \"Specify the git tag. Used to override pre-existing CI environment variables\\n[default: \\\"\\\"]\",\n \"21-0\": \"-U, --upstream\",\n \"21-1\": \"The upstream http proxy server to connect through\\n[string] [default: \\\"\\\"]\",\n \"22-0\": \"-v, --verbose\",\n \"22-1\": \"Run with verbose logging\\n[boolean]\",\n \"23-0\": \"-X, --feature\",\n \"23-1\": \"Toggle functionalities. Separate multiple ones by comma: -X network,search\\n\\n-X network Disable uploading the file network\\n-X search Disable searching for coverage files\\n[string]\",\n \"24-0\": \"--xcode, --xc\",\n \"24-1\": \"Run with xcode support\\n[boolean] [default: false]\",\n \"25-0\": \"--xcodeArchivePath, --xp\",\n \"25-1\": \"Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult\\n[string]\"\n },\n \"cols\": 2,\n \"rows\": 29\n}\n[/block]","order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-06-24T17:24:04.371Z","createdAt":"2021-06-25T16:33:38.777Z","updatedAt":"2022-05-17T21:21:26.387Z","user":"5a5f7365678e1d0012d7cbd8","category":"605e107fa1b4710022622bb9","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":5,"parentDoc":null,"deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027255a","hidden":false,"link_url":"","order":3,"slug":"team-bot","type":"basic","excerpt":"Choose a user account that will consume GitHub/Bitbucket/GitLab API in Codecov's build jobs.","githubsync":"","updates":["58ae0d57bd00b90f00a88ae7","5bf154c65968d0001807a000","609d3c4d19d558002f74d65f","609d3e2a23a4e0002c2fab0d","609d4036420519004f17af5f"],"version":"604a3fa3d6d5f0008027258e","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"isReference":false,"title":"Team Bot","createdAt":"2016-08-17T14:07:39.791Z","__v":5,"body":"[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"GitHub User? Install Codecov's GitHub App!\",\n \"body\": \"The best way to integrate with Codecov.io is to [Install Codecov's GitHub App](https://github.com/apps/codecov).\\n\\nOnce installed, you are done! You do not need to set a Team Bot because Codecov will use the integration to post statuses and comments.\\n\\n**Codecov Enterprise users:** The GitHub app is intended solely for use with Codecov.io. Please follow [this guide](https://docs.codecov.io/docs/how-to-create-a-github-app-for-codecov-enterprise) to setup a GitHub Enterprise app for Codecov Enterprise.\"\n}\n[/block]\nCodecov will use a single user's OAuth token to interact with your repositories, using GitHub/Bitbucket/GitLab API's. We call this the **Codecov Bot**. \n\nPlease follow these steps to select a Codecov Bot.\n\n1. Choose an existing user account, or create a new bot account (this would be a username for Github/Gitlab/Bitbucket).\n2. **Login with this account into Codecov.**\n - Grant private repository access for GitHub users.\n3. Set the bot in the Team Yaml by navigating to `/account///yaml`.\n4. Type in the new username in the yaml as seen below.\n5. Click Save.\n6. Run a CI and upload coverage to Codecov to confirm that the new setup works.\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/1484cac-Bot_Yaml_example.png\",\n \"Bot Yaml example.png\",\n 3146,\n 706,\n \"#fcfcfd\"\n ]\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# The user that you will use to serve as the bot connection to Codecov\\n# This bot user must have permissions on the repo and Codecov (by logging in)\\n\\ncodecov:\\n bot: #this is a username for Github/Gitlab/Bitbucket\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Team Bot FAQ\"\n}\n[/block]\n## Do I need to login with the bot account first?\n\nYes. Codecov needs to get the bot's account OAuth token and link the user to your team. It is very important to give the bot private repository access for GitHub customers.\n\n## Do I change the Team Yaml from the bot account?\n\nNo. Only [Codecov Administrators](doc:administration) and GitHub/GitLab/Bitbucket Team Administrators can adjust the Team Yaml.\n\n## [Github Users] Why am I getting two Codecov comments on my PR's?\n\nIf you use the Github App connection for Codecov (which you can check here: https://github.com/apps/codecov) AND separately set a team bot (which you can see in your YAML file), Codecov may double post comments. Please reset your team bot to null or reach out to us via our [support portal](https://codecov.freshdesk.com/support/home) asking for a team bot reset.","category":"605e107fa1b4710022622bb9","project":"57b33b5ec9a4551700b969a5","sync_unique":"","user":"5b47e58599e0430003d8e823","link_external":false,"next":{"pages":[],"description":""},"parentDoc":null,"updatedAt":"2021-12-20T15:53:13.401Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-05-13T14:20:09.081Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272545","__v":2,"isReference":false,"parentDoc":null,"type":"basic","category":"605e107fa1b4710022622bb9","createdAt":"2016-08-17T17:34:22.704Z","link_url":"","next":{"description":"You can group reports by applying a Flag, which comes with amazing UI additions and custom commit statuses. Learn more:","pages":[{"name":"Flags","slug":"flags","category":"Documentation","type":"doc","icon":"file-text-o"}]},"updates":["58adcbd575df0f1b001ed61d"],"sync_unique":"","version":"604a3fa3d6d5f0008027258e","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"method":"get"},"body":"A common practice in the modern developer's workflow is to test multiple build systems, split up tests in different containers, and group tests based on test focus (unittests vs integration tests). Codecov supports all these setups. Therefore, no setup is required.\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Multiple Languages\"\n}\n[/block]\nCodecov supports multiple languages in the same repository. You may upload reports for one or more languages, and Codecov will merge the reports automatically while maintaining the original upload context.\n\nCodecov **does not** override report data for multiple uploads. We always merge the data. Simply upload all three reports at once, or separately.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"script:\\n # run my python tests\\n - coverage run tests.py\\n \\n # Your Codecov Uploader approach here\\n\\t# See more at https://docs.codecov.com/docs/codecov-uploader\\n \\n # upload my python reports\\n\\t./codecov -cF python\\n # run my javascript tests\\n - npm test\\n # upload my javascript reports\\n ./codecov -cF javascript\\n\",\n \"language\": \"yaml\",\n \"name\": \"Multiple language example\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Delayed Notifications\"\n}\n[/block]\nCodecov will delay notifications such as Slack, Hipchat, and Pull Request Comments until **all** reports are uploaded and merged. This prevents posting invalid coverage metrics when the first report is uploaded.\n\nA good example of this is [pyca/cryptography](https://codecov.io/gh/pyca/cryptography), with over 20 containers uploading coverage reports to Codecov. Each container runs tests resulting in `~90%` coverage. However, when Codecov merges all reports together the result is `100%` coverage. Codecov will submit the notifications once it determines that CI is complete and all reports are merged. The notifications expresses 💯, a number they work hard for. Nice job pyca team! 👍 🎉 \n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Frequently Asked Questions\"\n}\n[/block]\n## How does Codecov know when to send notifications?\n\nCodecov will check, every minute, the status of each CI provider. If the status of any provider is `pending`, we will delay the notifications. If the status of any provider is `error` or `failure`, Codecov will cancel the notification entirely. If the status of all providers is `success`, the notifications will be submitted.\n\n## Why did I not receive a notification yet?\n\n- If the CI status is \"pending\", please wait until the CI is complete.\n- If the CI status is \"error\" or \"failed\", no notifications will be submitted.\n - [Disable CI pass requirement.](doc:detecting-ci-services)\n - [Disable a specific CI provider.](doc:detecting-ci-services)\n- If CI is successful:\n - is your CI provider in the list of [[Supported CI Providers]].\n - review [[Commit Build Logs]].\n - check if the reports failed to upload to Codecov.\n - make sure your [yaml is valid.](doc:codecov-yaml#section-validate-your-repository-yaml)\n\n## Why did I receive a notification too soon? \n\nIf you believe you are receiving a notification too soon, it may be in error. One way to prevent premature notifications, is preventing a notification until `N` builds, [YAML configuration for here](doc:notifications). \n\n\n## How do I remove checking a CI status?\n\nYou can toggle on and off `Require CI to Pass` setting in the YAML. [More details here ](doc:codecov-yaml#section-default-yaml)","excerpt":"No setup required. Automatic report merging for all CI and languages into a single report.","hidden":false,"project":"57b33b5ec9a4551700b969a5","githubsync":"","link_external":false,"order":4,"slug":"merging-reports","title":"Merging Reports","user":"5b47e58599e0430003d8e823","updatedAt":"2021-07-02T16:47:43.427Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-07-02T05:14:07.682Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272576","sync_unique":"","__v":8,"createdAt":"2016-12-14T17:52:06.439Z","githubsync":"","hidden":false,"link_external":false,"link_url":"","project":"57b33b5ec9a4551700b969a5","user":"5b47e58599e0430003d8e823","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","method":"get"},"next":{"pages":[],"description":""},"slug":"codecov-delta","updates":["587c1f298a03182d0012d600","587c20416045ce0f0047087f","58adf17745c2240f00673edb","5bc6e6fc160184005c50a2e9","5c2780c1c6db920043d832d2","5d8407b8514f540041743b95","60c2c472edb7fb002ab5e9a1","61fafeb53d0926006a3480e8"],"body":"The Codecov Delta (aka Codecov ∆) is our syntax for expressing coverage metrics and their impact on the scope of what is being measured.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Codecov calculations\"\n}\n[/block]\nIDEs and coverage collecting agents report coverage differently. Codecov does not conform to any standard, nor do we make any attempt to express our metrics in the exact same way the IDE, or coverage reports, may express coverage.\n\n- **hit** indicates that the source code was executed by the test suite.\n- **partial** indicates that the source code was not fully executed by the test suite; there are remaining branches that were not executed.\n- **miss** indicates that the source code was not executed by the test suite.\n\nCoverage is the ratio of `hits / (sum of hit + partial + miss)`. A code base that has 5 lines executed by tests out of 12 total lines will receive a coverage ratio of `41%` (rounding down).\n\nCodecov is a reporting tool that is intended to process any coverage report format into a format that is standard across Codecov.\n\nYou may change the configuration of how Codecov processes reports and expresses coverage information. Please review our [Codecov Yaml](doc:codecov-yaml) to learn about the configuration options.\n[block:api-header]\n{\n \"title\": \"What is Codecov Delta\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"absolute (change)\\n35% <72%> (+4%)\",\n \"language\": \"text\",\n \"name\": null\n }\n ]\n}\n[/block]\nThere are three data points in the Codecov Delta:\n1: The absolute scope. e.g., 35%.\n2: The relative scope. e.g., <72%>.\n3: The change in coverage. e.g., (+4%).\n\n## Absolute\nThe entire project's coverage. \n\nRead as `\"The entire project coverage is 35%.\"`\n\n## Relative\nCoverage concerning _only_ lines adjusted in the commit diff (aka the diff coverage)\n\nRead as `\"The lines I changed in this commit are 72% covered.\"`\nAlso read as `\"The coverage of this commit's diff is 72%.\"`\n\n## Change\nThe amount of gain or loss of coverage when compared to the commit's parent.\n\nRead as `\"This commit increased this project's coverage by 4%.\"`\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Examples\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/dfe5871-Screen_Shot_2017-01-15_at_8.32.26_AM.png\",\n \"Screen Shot 2017-01-15 at 8.32.26 AM.png\",\n 532,\n 136,\n \"#e43c94\"\n ],\n \"caption\": \"Project coverage is 84%.\\nThe commit did not adjust any tracked lines.\\nThe commit did not change the coverage ratio.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3a2f6b3-Screen_Shot_2017-01-15_at_8.56.32_AM.png\",\n \"Screen Shot 2017-01-15 at 8.56.32 AM.png\",\n 508,\n 104,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 72%.\\nThe commit diff was 100% covered.\\nThe commit did not change project coverage.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/5db8343-Screen_Shot_2017-01-15_at_8.34.24_AM.png\",\n \"Screen Shot 2017-01-15 at 8.34.24 AM.png\",\n 516,\n 112,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 60.74%.\\nCommit diff was not affected.\\nCoverage decreased by .14%.\\n*An example of [Unexpected Coverage Changes](doc:unexpected-coverage-changes)*.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3d839a3-Screen_Shot_2017-01-15_at_8.47.34_AM.png\",\n \"Screen Shot 2017-01-15 at 8.47.34 AM.png\",\n 526,\n 120,\n \"#e7f4e3\"\n ],\n \"caption\": \"Project coverage at this commit is 61%.\\nCommit diff is 100% covered.\\nCoverage increased by 1%.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f034515-Screen_Shot_2017-01-15_at_8.51.41_AM.png\",\n \"Screen Shot 2017-01-15 at 8.51.41 AM.png\",\n 528,\n 120,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 50%.\\nCommit diff is 20% covered.\\nCoverage dropped by 3%.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/51798bc-Screen_Shot_2017-01-16_at_1.54.44_PM.png\",\n \"Screen Shot 2017-01-16 at 1.54.44 PM.png\",\n 514,\n 104,\n \"#e33c93\"\n ],\n \"caption\": \"Project is 80% covered.\\nCommit diff was not affected.\\nCoverage dropped 1%.\\n*Example of [Coverage Offset](doc:coverage-offset)*.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"What is \\\"ø\\\"?\"\n}\n[/block]\n> The character `ø` represents \"not affected\" or \"no change\". This value could be found in the **** and **(change)** block of the Coverage Delta.\n\nWhen found in the **** block, it represents that the coverage diff was not concerning coverage. (e.g a commit that only adjusts lines *not* tracked by coverage.)\n\nWhen found in the **(change)** block, it represents that coverage did not change. (e.g. `0%` change. The commit did not affect project coverage.)\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Contexts\"\n}\n[/block]\nWe use the Codecov Delta throughout the app. It expresses details for the entire project, flags, diffs, folders and files. It is important to understand the context of the delta.\n\nThe absolute, relative, and change metrics refer to the context. In the example below, the Codecov Delta appears in the file headers. The Delta's metrics concern only the file itself.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b6544f2-Screen_Shot_2017-01-15_at_11.10.27_AM.png\",\n \"Screen Shot 2017-01-15 at 11.10.27 AM.png\",\n 2290,\n 186,\n \"#f3f5f2\"\n ],\n \"caption\": \"The file `reference.go` is 79% covered.\\nIn this commit there was 12 lines added which were 100% covered.\\nIt results in the file having 5% more coverage.\"\n }\n ]\n}\n[/block]","category":"605e107fa1b4710022622bb9","order":5,"type":"basic","version":"604a3fa3d6d5f0008027258e","excerpt":"Understanding the numbers and syntax","isReference":false,"parentDoc":null,"title":"Codecov Delta","updatedAt":"2021-12-21T11:08:01.148Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-06-10T21:45:18.971Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272543","category":"605e107fa1b4710022622bb9","version":"604a3fa3d6d5f0008027258e","link_external":false,"slug":"coverage-diff","user":"57b33af9eeec08220094ea97","githubsync":"","hidden":false,"isReference":false,"link_url":"","project":"57b33b5ec9a4551700b969a5","body":"Codecov's unique Coverage Diff is a snapshot of the changes in coverage, when comparing two references.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/e9e41c2-Screen_Shot_2017-01-20_at_10.32.33_AM.png\",\n \"Screen Shot 2017-01-20 at 10.32.33 AM.png\",\n 630,\n 390,\n \"#f3f2f1\"\n ],\n \"caption\": \"The row colors represent good and bad changes. **Red** is change for the worse. **Green** is change for the better.\"\n }\n ]\n}\n[/block]","createdAt":"2016-08-17T11:26:37.383Z","title":"Coverage Diff","next":{"pages":[],"description":""},"order":6,"parentDoc":null,"sync_unique":"","type":"basic","__v":2,"api":{"auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"code":"{}","language":"json","status":400,"name":""}]},"settings":"","url":""},"excerpt":"","updates":["58ae02657c4be91900bca532","60b96a89b2029f003425f78e"],"updatedAt":"2019-12-06T17:00:07.744Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-06-03T21:26:57.920Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272547","category":"605e107fa1b4710022622bb9","excerpt":"","isReference":false,"next":{"pages":[],"description":""},"project":"57b33b5ec9a4551700b969a5","title":"Merge Commits","user":"57b33af9eeec08220094ea97","__v":1,"githubsync":"","link_external":false,"link_url":"","parentDoc":null,"slug":"merge-commits","updates":["58add25575df0f1b001ed6bd"],"body":"Merge Commits are unique commits automatically generated by CI providers to run tests against the resulting code of merging tip of pull request into tip of base branch. The commits have the following message:\n\n```\nMerge 5dbd38670e2d2c0d008d5cabccebd66688040abc into 89f5cb881ab3f48409e795b160f244d53869ecdd\n- or -\nMerge pull request #1 from repo/branch\n```\n\nBelow is a diagram of how Codecov will handle comparing merge commits.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"master a • • b \\nrefs/pull/#1/merge mc\\nPR #1 \\\\ • • x /\\n\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n> - `a` is pull request #1 base commit.\n> - `x` is #1 head commit.\n> - `b` is the head of `master`.\n> - `mc` is the merge commit containing `a b x`.\n\n### When testing Merge Commit\n- **Compare** `b...mc`.\n- **Status Context** `codecov/merge/project`.\n- `mc` is **not** used in compare views like `/gh/owner/repo/pull/1/compare`.\n\n### Testing Pull Request Head\n- **Compare** `a...x`.\n- **Status Context** `codecov/project`.\n- `x` is used in compare views like `/gh/owner/repo/pull/1/compare`.\n\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Merging Pull Requests from GitHub UI\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/45c915c-6f3b11c2-5ae4-11e6-8abd-930f37a3850c.png\",\n \"6f3b11c2-5ae4-11e6-8abd-930f37a3850c.png\",\n 1418,\n 426,\n \"#f8f8f8\"\n ]\n }\n ]\n}\n[/block]\n\nWhen merging pull requests in GitHub, there will be a new commit with the message `Merge pull request #1 from repo/branch`. This commit is not generated by CI, and should be tested like any other commit on a branch. Popular CI providers test these commits by default.\n\nIf a merge commit was previously tested at the same base head and pull head, then Codecov will recognize this commit as the report for the new merge commit. The commit and source code are equivalent.","hidden":false,"order":7,"sync_unique":"","version":"604a3fa3d6d5f0008027258e","api":{"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[]},"createdAt":"2016-08-17T17:44:28.789Z","type":"basic","updatedAt":"2019-12-06T17:00:07.729Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027254f","parentDoc":null,"project":"57b33b5ec9a4551700b969a5","title":"Fixing Reports","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"createdAt":"2016-08-30T12:19:29.378Z","githubsync":"","hidden":false,"order":8,"type":"basic","__v":1,"body":"The following languages, and their reports, will be adjusted upon uploading to Codecov. You may disable this by setting the flag `-X fix` in your upload command.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Go\"\n}\n[/block]\nBy default Go coverage reports includes:\n\n- Empty lines.\n- Comments (`//` and blocks `/* ... */`).\n- Lines with a single bracket (`{` or `}`).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"C languages and Swift\"\n}\n[/block]\n> ObjC, Swift, .cpp, .h, .cxx, .c, .hpp, .jsx\n\n- - Lines with a single bracket (`{` or `}`)\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"PHP\"\n}\n[/block]\n- Lines with a single bracket (`{` or `}`).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Kotlin\"\n}\n[/block]\nKotlin produces Jacoco reports. \n\nCodecov fixes the following:\n- Extra statements that [exceed the EOL] (planned)(https://youtrack.jetbrains.com/issue/KT-9766).\n- Comment lines.","sync_unique":"","excerpt":"","link_url":"","next":{"pages":[],"description":""},"updates":["58aded9245c2240f00673ed2"],"user":"57b33af9eeec08220094ea97","version":"604a3fa3d6d5f0008027258e","category":"605e107fa1b4710022622bb9","isReference":false,"link_external":false,"slug":"fixing-reports","updatedAt":"2021-07-02T16:31:25.801Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272548","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"createdAt":"2016-08-17T17:54:48.554Z","link_external":false,"link_url":"","title":"Unexpected Coverage Changes","type":"basic","version":"604a3fa3d6d5f0008027258e","__v":1,"category":"605e107fa1b4710022622bb9","parentDoc":null,"slug":"unexpected-coverage-changes","updates":["58add4be4b3e0b0f00e1bd0e"],"user":"620a88fb4945600073cd5bce","excerpt":"","hidden":false,"isReference":false,"next":{"pages":[],"description":""},"order":9,"project":"57b33b5ec9a4551700b969a5","sync_unique":"","body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Looking for additional help?\",\n \"body\": \"See our video tutorial on diagnosing unexpected coverage changes at the bottom of this page.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nWe have found there are many reasons why coverage may change in unexpected ways. \n\nCoverage changes are coverage to lines of code that are not adjusted in the pull/commit diff. This can occur for a number of reasons.\n\nCodecov will analyze the pull/commit diff, detecting lines of code that changed without being adjusted. A simple example of this is removing tests, which is shown below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"## Unchanged source\\ndef string_len(string):\\n return len(string)\\n\\n## Removed test\\n- def test_my_method():\\n- assert string_len('jedi') == 4\",\n \"language\": \"python\"\n }\n ]\n}\n[/block]\nIn the code above, the developer removed a single test which changes the coverage of the method `string_len` from being `hit` to `missed`. \n\nThis change in coverage will be surfaced in the Codecov App through our **Changes** page.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Reasons for unexpected changes\"\n}\n[/block]\nThere are a number of reasons we have found that cause line coverage to change unexpectedly. These can be due to:\n\n1. Adding or removing tests.\n2. Failing to upload coverage reports, or a different number of reports between head and base\n3. Time sensitive tests.\n4. Missing coverage reports or failed builds.\n5. Dependencies changed resulting in a different execute plan.\n6. Encrypted variables may prevent some execution paths.\n7. In the case of changes to a PR, the base or head commits may not have had an uploaded report, or may not be the commit you expect\n8. Different error handling paths: sometimes exception handlers are tested and some are not, oftentimes the root of \"flaky\" tests\n9. Due to long running test builds or dynamic test selection, you are intentionally **not** running all tests on every commit. If this is the case, please check out our feature [Carryforward Flags](doc:carryforward-flags)\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"How to find the root cause\"\n}\n[/block]\nMost unexpected changes occur in the raw coverage report before Codecov processes the uploaded coverage file. \n\nHow to review the the coverage report for unexpected changes:\n\n1. Open the head and base commits for this PR, seen below in the \"Source\" section surrounded by a green box below. \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/152187a-Screen_Shot_2022-05-25_at_11.39.51_AM.png\",\n \"Screen Shot 2022-05-25 at 11.39.51 AM.png\",\n 2544,\n 1142,\n \"#f8f9fa\"\n ]\n }\n ]\n}\n[/block]\n3. On the right hand side of a commit page you will find the raw coverage reports listed in order of upload\n4. The first piece to investigate is the number of reports themselves. Are they the same between the two commits? If they're different, that's likely the cause of the discrepancy. In the example above, you can see in the highlighted box there's \"2 errored, 14 successful\" - you want to see an identical result between both commits to rule this out.\n5. Click the **Download** button on one or more of your uploads - if you're seeing coverage changes on a specific flag, it might be easiest to focus on the relevant reports to that flag.\n6. In your downloaded file, ctrl+f on \"# path=\" to take you past your file list and directly to the beginning of your raw coverage reports. \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/c827a50-Screen_Shot_2022-05-25_at_12.35.25_PM.png\",\n \"Screen Shot 2022-05-25 at 12.35.25 PM.png\",\n 3202,\n 690,\n \"#191919\"\n ]\n }\n ]\n}\n[/block]\n7. Review the raw coverage reports from one commit to the next looking for discrepancy in coverage, if you have a hit on the file from one commit, but not the file from the other commit, that's going to be the source of your coverage change. \n8. You'll next need to review the specified lines of code with different coverage reports from both commits to determine the root cause. \n\n> Codecov stores the raw, unprocessed report data precisely for this issue. Reports are archived for 30 days before removal.\n[block:api-header]\n{\n \"title\": \"Video Tutorial\"\n}\n[/block]\n\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=QyXk6QwAXk8&feature=youtu.be\",\n \"title\": \"[Video Tutorial] Codecov Unexpected Coverage Changes\",\n \"favicon\": \"https://www.youtube.com/s/desktop/a386e432/img/favicon.ico\",\n \"image\": \"https://i.ytimg.com/vi/QyXk6QwAXk8/hqdefault.jpg\"\n}\n[/block]\n*Example repository from video: https://github.com/kensho-technologies/graphql-compiler/pull/806*","githubsync":"","updatedAt":"2022-05-25T20:34:19.127Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-09T18:49:30.712Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272577","body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Hits and missed lines\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/68d3eff-Screen_Shot_2017-01-15_at_8.26.04_PM.png\",\n \"Screen Shot 2017-01-15 at 8.26.04 PM.png\",\n 1012,\n 122,\n \"#dbfada\"\n ],\n \"caption\": \"Lines that **are** hit (covered and executed).\\nThe number in the green label represents execute count.\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/17a6c0b-Screen_Shot_2017-01-15_at_8.25.36_PM.png\",\n \"Screen Shot 2017-01-15 at 8.25.36 PM.png\",\n 1032,\n 132,\n \"#f9cbcb\"\n ],\n \"caption\": \"Lines that are missed (not covered and not executed).\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Partially covered lines\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f8b8f3d-Screen_Shot_2017-01-15_at_8.28.22_PM.png\",\n \"Screen Shot 2017-01-15 at 8.28.22 PM.png\",\n 1114,\n 190,\n \"#f1e3c7\"\n ],\n \"caption\": \"Line 329 is partially hit.\"\n }\n ]\n}\n[/block]\n Partially hit lines are typically branches that have one, or more, missing execution paths. In the example above, the missing execution path is clearly entering the `if` branch. The result of `ref.name() == \"\"` was **always** `False`, therefore the proceeding lines were never executed.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Line coverage changes\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/27f12b9-Screen_Shot_2017-01-17_at_1.40.03_PM.png\",\n \"Screen Shot 2017-01-17 at 1.40.03 PM.png\",\n 914,\n 424,\n \"#357826\"\n ]\n }\n ]\n}\n[/block]\nThis layout is an example of [Unexpected Coverage Changes](doc:unexpected-coverage-changes). The coverage on line 149 and 150 was **covered** before this commit. Now these lines are partially hit and missed, respectively.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Diff overlay\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4fcbdb4-Screen_Shot_2017-01-20_at_10.05.38_AM.png\",\n \"Screen Shot 2017-01-20 at 10.05.38 AM.png\",\n 2130,\n 418,\n \"#edf0ed\"\n ]\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/33bf1ab-Screen_Shot_2017-01-20_at_10.09.41_AM.png\",\n \"Screen Shot 2017-01-20 at 10.09.41 AM.png\",\n 2288,\n 540,\n \"#ebf1e8\"\n ]\n }\n ]\n}\n[/block]","isReference":false,"title":"Viewing Source Code","type":"basic","updates":["58adf25245c2240f00673ee5","5c74f23127b72e00207e5325","5c98a7a3ef96c2002b76911c","6093bd3be9389e0033e706bd"],"__v":4,"category":"605e107fa1b4710022622bb9","hidden":false,"next":{"pages":[],"description":""},"version":"604a3fa3d6d5f0008027258e","parentDoc":null,"sync_unique":"","createdAt":"2017-01-16T01:23:16.822Z","excerpt":"","githubsync":"","link_url":"","order":10,"api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"method":"get"},"link_external":false,"project":"57b33b5ec9a4551700b969a5","slug":"viewing-source-code","user":"57b33af9eeec08220094ea97","updatedAt":"2019-12-06T17:00:07.740Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-05-05T20:26:09.984Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027257a","project":"57b33b5ec9a4551700b969a5","sync_unique":"","type":"basic","createdAt":"2017-01-18T15:34:54.277Z","hidden":false,"link_external":false,"link_url":"","order":11,"user":"57b33af9eeec08220094ea97","excerpt":"","githubsync":"","__v":5,"body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Sunburst\"\n}\n[/block]\nThe coverage sunburst is an interactive graph that enables you to navigate into project folders in order to discover files that lack in code coverage. The size of each slice is the total number of tracked coverage lines, and the color indicates the coverage.\n\nClick on a block to enter a folder.\nClick the inner-most circle to leave that folder.\nShift+Click to navigate your browser to that folder or file.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/0ac5d1e-graph.gif\",\n \"graph.gif\",\n 513,\n 435,\n \"#a9af1b\"\n ]\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Coverage Reach\"\n}\n[/block]\nThe coverage reach graph focuses on files that have changed in coverage when comparing two commits.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/1e9828c-Screen_Shot_2017-01-18_at_10.41.57_AM.png\",\n \"Screen Shot 2017-01-18 at 10.41.57 AM.png\",\n 1202,\n 540,\n \"#dbdad8\"\n ]\n }\n ]\n}\n[/block]\n- Each block size represents the number of tracked lines in the file.\n- **Purple** blocks represent files that are introduced.\n- **Solid Red** blocks represent files in the commit/compare diff where coverage decreased.\n- **Solid Green** blocks represent files in the commit/compare diff where coverage increased.\n- **Dotted Red** blocks represent files *not found* in the commit/compare diff where coverage decreased.\n- **Dotted Green** blocks represent files *not found* in the commit/compare diff where coverage increased.\n- **Grey** blocks represent files that have no coverage change.","isReference":false,"slug":"graphs","updates":["58ae03dcb283cb0f00269365","5bd70bec54569200ae98a086","5ee5d969c3ff820067bb32a3","5fe919916cd5c30035c6543e","60b803fb9201ef007300fe06"],"version":"604a3fa3d6d5f0008027258e","api":{"params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"category":"605e107fa1b4710022622bb9","next":{"pages":[],"description":""},"parentDoc":null,"title":"Graphs","updatedAt":"2019-12-06T17:00:07.745Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-12-27T22:21:07.586Z","children":[],"childrenPages":[]}]},{"_id":"605e135b517d83006763f4ed","title":"Features","slug":"features","order":2,"reference":false,"isAPI":false,"project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","createdAt":"2021-03-26T17:01:15.653Z","__v":0,"pages":[{"_id":"60941a2e47ab980072017501","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Status Badges","updates":[],"type":"basic","slug":"status-badges","excerpt":"","body":"You can access Status Badges for your Repository by visiting this page in your Repo Settings (please make sure to adapt the following URLs to your particular Org and Repo name):\n\n1. Access your Codecov account: https://app.codecov.io//\n2. Access the Repository: https://app.codecov.io///\n3. Access the Repository's Settings page: https://app.codecov.io////settings/badge\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/2184511-Screen_Shot_2021-05-06_at_1.24.18_PM.png\",\n \"Screen Shot 2021-05-06 at 1.24.18 PM.png\",\n 1261,\n 802,\n \"#cacccc\"\n ]\n }\n ]\n}\n[/block]\nIf you have any questions, please [reach out to us](https://codecov.freshdesk.com/en/support/solutions).","order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-05-05T21:04:23.059Z","createdAt":"2021-05-06T16:32:46.034Z","updatedAt":"2021-05-10T16:53:19.810Z","user":"5d092c3807c8fa0050ab00c3","category":"605e135b517d83006763f4ed","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":null,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272544","githubsync":"","sync_unique":"","updates":["58adf4e80e6cb80f00eaf0eb","5c055241658aff0129d9059b","5d13a4649e149600455a319e","5dbf0e217d655f00164d5ae4","5e924eb2ae0cbf002d876a2e","5ea1aa6a58fbec0045f1b435","5ea1aba1cfd87204dbc6a264","5ea1ac0c2dd0de0011f5b1b2","5ea1acb81ef6c80058a7f25a","5ec481c6ef90570308cf3e2c","5fd904094d6b23005faa3c12","6012c96b23314c0073927ce2","601d860ae166820065de499c","605a84613b58c4003549e8b5","609c4283fceccc030edecfb1"],"link_external":false,"user":"5a5f7365678e1d0012d7cbd8","version":"604a3fa3d6d5f0008027258e","__v":15,"createdAt":"2016-08-17T11:27:52.389Z","excerpt":"Group coverage reports based on type of tests or sub-projects/teams.","isReference":false,"slug":"flags","type":"basic","api":{"settings":"","url":"","auth":"required","method":"get","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]}},"hidden":false,"parentDoc":null,"order":1,"project":"57b33b5ec9a4551700b969a5","title":"Flags","body":"Flags allow you to isolate and categorize coverage reports for different tests and features in your project. This is particularly helpful if: \n1. You have multiple types of tests (e.g., unit, integration, frontend, backend, etc) \n\nAND/OR\n\n2. You're employing a monorepo setup where you'd like to encapsulate each project's test coverage independently.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/55cb482-Google_Chrome_2021-02-05_11-41-022x.png\",\n \"Google Chrome_2021-02-05 11-41-02@2x.png\",\n 1846,\n 1650,\n \"#f3f3f4\"\n ],\n \"caption\": \"Coverage by Flag in PR Comment\",\n \"border\": true,\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Flags Example\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"To see the \\\"flags\\\" feature in action, you can also take a look at this video tutorial: https://about.codecov.io/product/feature/flags/\",\n \"title\": \"Video Walkthrough\"\n}\n[/block]\nAs a minimal example, consider a project called `Monorepo X` that has the following folder structure:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"Monorepo X\\n /front-end\\n /back-end\\n /mobile\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\nWe'll refer back to this `Monorepo X` example throughout the document.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Step 1: Flag Creation in Uploader\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"You Must Upload using -F \",\n \"body\": \"To properly leverage flags and you must ensure you are uploading coverage reports with the appropriate flag name.\"\n}\n[/block]\nTo apply a flag simply submit coverage reports with the `-F flagname` included in the upload command. (Note: remember, Codecov always recommends the [Uploader in your CI](doc:codecov-uploader))\n\nIt is important to note that for flagging to work, separate coverage reports must be uploaded and flagged per project in the mono repo. For example, in a CI run for the `Monorepo X` project example, assume that coverage for moduleA is written to \n\n`tests/front-end/output/coverage.xml`\n\nThen that report would be uploaded as follows:\n\n`./codecov -t -f tests/front-end/output/coverage.xml -F moduleA`\n\n\nNow, your flag level coverage is being uploaded to Codecov. \n\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Ideal example of Flags matched to uploads\\n\\n# Your Codecov Uploader approach here\\n# See more at https://docs.codecov.com/docs/codecov-uploader\\n\\n# example running unittests only\\npy.test --cov=./ -k tests/unittests/\\n./codecov -c -F unittests\\n\\n# example running integration tests only\\npy.test --cov=./ -k tests/integration/\\n./codecov -c -F integration\\n\\n# example running ui tests only\\nnpm test\\n./codecov -c -F ui\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### One-to-One Relationship of Flags to Uploads\n\nSpecifying multiple flags for a single report upload can result in erroneous coverage unless the contents of that report fully encompass each flag. \n\nFor example, one report that contains coverage information for moduleA and moduleB, can be uploaded in a manner that is valid but technically incorrect: \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Not ideal example of many-to-one Flags to upload\\n \\n./codecov -t \\n -f coverage.xml -F front-end -F back-end -F mobile\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nThis will apply the entire coverage of the report to both flags, resulting in incorrect coverage. Specifically, the `front-end`, `back-end` and `mobile` flags will display the coverage of the entire uploaded report, not just the subset of the report that happens to cover the files under their purview.\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Flags Must consist only of alphanumeric characters, '_', '-', or '.' and not exceed 45 characters\",\n \"body\": \"Flag names will be validated against the following regex. `^[\\\\w\\\\.\\\\-]{1,45}$`\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Step 2: Flag Management in YAML\"\n}\n[/block]\nOnce the uploader step is done (above), Flag-level coverage is being sent to Codecov, but, to unlock the full feature set of Codecov, you'll additionally to add Flag Management to your repository-level YAML.\n\nHere are just a few features unlocked by adding Flag definitions to your YAML.\n \n1. Flags in [PR Comments](doc:pull-request-comments) and [Status Checks](doc:commit-status) in your Github, Gitlab, Bitbucket instance\n2. Overlay [source code coverage in UI](doc:viewing-source-code) by Flag\n3. [Carryforward Flags](doc:carryforward-flags) for partial test runs\nEtc.\n\n\n\n[block:api-header]\n{\n \"title\": \"Two approaches to Flag Management\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/d02369b-Documentation__Two_approaches_to_Flag_Management.png\",\n \"Documentation_ Two approaches to Flag Management.png\",\n 1828,\n 1158,\n \"#e7e0e7\"\n ],\n \"sizing\": \"full\",\n \"border\": false\n }\n ]\n}\n[/block]\n### Recommended: Automatic Flag Management\n\nCodecov's recommended approach to Flags is based on YAML settings under `flag_management:`\n\nA. Relies on a set of `default_rules:` to automatically ingest uploaded flags, and manage Flags in an ongoing manner\n\nB. If you have flags that don't fit the `default_rules:`, Universal Flag Settings allows for customization for any flags using `individual_flags_rules:`\n\nHere is an example of `default_rules:` in the YAML\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"flag_management:\\n default_rules: # the rules that will be followed for any flag added, generally\\n carryforward: true\\n statuses:\\n - name_prefix: project-\\n type: project\\n target: auto\\n threshold: 1%\\n - name_prefix: patch-\\n type: patch\\n target: 90%\\n individual_flags: # exceptions to the default rules above, stated flag by flag\\n - name: feature_1 #fill in your own flag name\\n paths: \\n - src/feature_1 #fill in your own path. Note, accepts globs, not regexes\\n carryforward: true\\n statuses:\\n - name_prefix: new\\n type: project\\n target: 20%\\n - name_prefix: new\\n type: patch\\n target: 100%\\n - name: feature_2 #fill in your own flag name\\n paths: \\n - src/feature_2 #fill in your own path. Note, accepts globs, not regexes\\n carryforward: true\\n statuses:\\n - name_prefix: new\\n type: project\\n target: 20%\\n - name_prefix: new\\n type: patch\\n target: 100%\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nChanging your YAML? A reminder to always validate before you deploy [https://api.codecov.io/validate](https://api.codecov.io/validate)\n\n### Advanced: Bespoke Flag Management\n\nIf you are going to use Bespoke Flag Management, you must add every flag individually to your YAML, which can be quite manual. \n\nTo generate a flag and individual coverage gates per project in the mono repo the `codecov.yml` can be structured as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Setting coverage targets per flag\\ncoverage:\\n status:\\n project:\\n default:\\n target: 90% #overall project/ repo coverage\\n front-end:\\n target: 60%\\n flags:\\n - front-end\\n back-end:\\n target: 100%\\n flags:\\n - back-end\\n mobile:\\n target: 80%\\n flags:\\n - mobile\\n\\n# adding Flags to your `layout` configuration to show up in the PR comment\\ncomment:\\n layout: \\\"reach, diff, flags, files\\\"\\n behavior: default\\n require_changes: false \\n require_base: yes\\n require_head: yes \\n branches: null\\n\\n# New root YAML section = `flags:`\\n# This is where you would define every flag from your\\n# uploader, and update when new Flags added\\n\\nflags:\\n front-end:\\n paths: #note, accepts globs, not regexes\\n - src/front-end/code.js\\n carryforward: false\\n back-end:\\n paths: #note, accepts globs, not regexes\\n - src/back-end/api_code.py\\n carryforward: true\\n mobile:\\n paths: #note, accepts globs, not regexes\\n - src/new/mobile/app_code.java\\n carryforward: true\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nThis yaml configuration will **fail** a Pull Request if...\n\n• ...the entire Monorepo project is below 90% covered (this is the `default` specification of the yaml above)\n• ...the front-end coverage is less than 60%\n• ...the back-end (API) coverage is less than 100%\n• ...the mobile coverage is less than 80%\n\n\nThe `front-end` flag can be used for any number of reports (unit tests, integration tests, etc) by flagging each report with `front-end`. The reports will be merged and contribute to the project's total coverage and the total coverage of the files covered under the `front-end` flag.\n\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Remove old reports after uploading (optional)\",\n \"body\": \"Apply the `-c` argument to clear the workspace of all coverage reports before running you next set of tests.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Additional Flag Use Cases\"\n}\n[/block]\n### Carryforward Flags\n [Full documentation](doc:carryforward-flags)\n\nIf you do not test all of your repo code on each commit, Codecov uses a feature called Carryforward Flags to help only update coverage on tests that were run. Carryforward Flags is built on top of basic Flags.\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Carryforward Flag Usage\",\n \"body\": \"It is _highly_ recommended to read the [full documentation](doc:carryforward-flags) on carryforward flags before using them in your project.\"\n}\n[/block]\n Carryforward Flags are used by appending your YAML with `carryforward: true`:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"flags:\\n ui:\\n paths: #note, accepts globs, not regexes\\n - ui_1.py\\n - ui_2.py\\n carryforward: true\\n unit:\\n paths:\\n - unit_1.py\\n - unit_2.py\\n carryforward: true\\n enterprise:\\n paths:\\n - ent_1.py\\n - ent_2.py\\n carryforward: false \\n # If no Carryfoward flag specified in YAML, the\\n # default configuration is false.\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### Create custom notifications\n\nFlags can be used to create custom notifications to your repository provider. This makes it easy to see per-flag coverage information alongside pull requests. \n\nYou can specify Flags in your Codecov Yaml for statuses and all notifications. Note that a flag must be specifically stated in the `status:` section of the YAML to have a custom notification associated. \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default: off\\n frontend:\\n flags: \\n - frontend\\n backend:\\n target: 50%\\n flags: \\n - backend\\n api:\\n target: 89%\\n flags: \\n - api\\n\\nflags:\\n # filter the folder(s) you wish to measure by that flag\\n backend:\\n # only include files in the backend folder\\n paths: #note, accepts globs, not regexes\\n - app/backend/\\n frontend:\\n paths:\\n - app/frontend/\\n api:\\n paths:\\n - app/api/\\n tests:\\n paths:\\n - tests/\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f89ab42-Screen_Shot_2016-08-17_at_3.54.13_PM.png\",\n \"Screen Shot 2016-08-17 at 3.54.13 PM.png\",\n 1408,\n 712,\n \"#f9f9f9\"\n ],\n \"caption\": \"**Custom Statuses** only report on specific Flags.\"\n }\n ]\n}\n[/block]\n### Hide Builds (e.g., nightly builds)\n\nCodecov provides a strategy to isolate specific builds from the master report while maintaining the report's integrity. When reports are **not joined** into the master report, they will be ignored for comparison, although they will remain accessible for source overlay, API, badges, and graphing.\n\nA nightly build is an example of this feature. What follows is a Yaml configuration for a nightly build.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"flags:\\n nightly:\\n joined: false\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nNow that we have configured the flag `nightly` to not join into the master report, let's upload a report flagged as `nightly`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Your Codecov Uploader approach here\\n# See more at https://docs.codecov.com/docs/codecov-uploader\\n\\n./codecov -F nightly\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nBy adding `-F nightly` we mark all the coverage report data for this build as `nightly` coverage data.","category":"605e135b517d83006763f4ed","link_url":"","next":{"pages":[],"description":""},"updatedAt":"2022-01-19T15:36:39.260Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-12-14T23:12:42.245Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272584","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Carryforward Flags","updates":["5e978ae937c33b02797fd02f","5ed77d06bbb426002cbe9dc6","5f2af75070f29c004b04e9eb","5f451ccbadccac04dfc967a9","5fd8d4d02e6a2a003edc0fd5","5ffdf1e275479c0025a7d2c4","60b9612b245b22001c501d39","62180a6ab237a6002da1989c"],"type":"basic","slug":"carryforward-flags","excerpt":"Reference of past coverage for tests that are not run on current commit.","body":"[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"Carryforward Flags are Best Used for Monorepos and Iterative Testing Setups\",\n \"body\": \"Carryforward Flags are designed for projects that do not upload total coverage for every commit (e.g., monorepos with multiple applications/languages, iterative/partial/delta testing setups, etc).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Before Getting Started\"\n}\n[/block]\nTo benefit from Carryforward Flags, make sure you are set up with Codecov's Flag feature, to tag different sessions/builds. \n\n[Basic Flags documentation](doc:flags), including:\n\n1. Set Flags in your YAML\n2. Passing `-F` parameter in your upload\n\nA straightforward example repository using carryforward flags can be seen here: \n\nGitHub -- https://github.com/codecov/cf-flags-demo\nCodecov -- https://codecov.io/gh/codecov/cf-flags-demo\n[block:api-header]\n{\n \"title\": \"How Carryforward Flags Work: A Motivating Example\"\n}\n[/block]\nBefore discussing how to use carryforward flags, it's important to discuss how they work. That is best demonstrated with the following diagram:\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/1366bdb-PART_I_--_New_v1.jpg\",\n \"PART I -- New v1.jpg\",\n 2260,\n 1352,\n \"#f5f4f7\"\n ],\n \"caption\": \"An example of 2 commits using flags\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/5f3fa63-PART_II_--_New_v1.jpg\",\n \"PART II -- New v1.jpg\",\n 2260,\n 1352,\n \"#f5f6f9\"\n ],\n \"caption\": \"An example of 2 commits using Caryforward flags\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/bea584f-PART_III_--_New_v1.jpg\",\n \"PART III -- New v1.jpg\",\n 2260,\n 1352,\n \"#f5f5f8\"\n ],\n \"caption\": \"An example of a commit with no coverage report, and no carryforward flags.\"\n }\n ]\n}\n[/block]\nThe following codecov.yml is also supplied for the above example:\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"flags:\\n ui:\\n paths: #note, accepts globs, not regexes\\n - ui_1.py\\n - ui_2.py\\n carryforward: true\\n unit:\\n paths:\\n - unit_1.py\\n - unit_2.py\\n carryforward: true\\n enterprise:\\n paths:\\n - ent_1.py\\n - ent_2.py\\n carryforward: false \\n # If no Carryfoward flag specified in YAML, the\\n # default configuration is false.\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIn this example, the coverage for `ui_1.py` and `ui_2.py` was taken directly from the coverage report uploaded for Commit 1. The `ui_cov.xml` coverage report was uploaded using the following syntax:\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Your Codecov Uploader approach here\\n# See more at https://docs.codecov.com/docs/codecov-uploader\\n\\n./codecov -f ui_cov.xml -F ui\\n\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\nThis upload command specifies both the path to the coverage file for files under the ui flag and the appropriate flag name (ui in this case). Once uploaded, coverage was calculated to the ui_1.py and ui_2.py files in the same manner as any report upload. \n\nSince no report is uploaded for the `unit` flag, which has a setting of `carryforward: true` , Codecov reaches back to Commit 0 to carry forward the coverage for all files covered by the `unit` flag. As a result, those files have coverage information for Commit 1 that is equivalent to Commit 0. \n\nFinally, since the `enterprise` flag has a setting of `carryforward: false` no coverage is carried forward for any file covered by the `enterprise` flag. Since no coverage report was uploaded for the `enterprise` flag for Commit 1, the `ent_1.py` and `ent_2.py` files have 0% coverage for Commit 1. \n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"You can use a regular expression as the \\\"path\\\", as in the example below.\\n\\nThis would be most common in a set of Integration or End-to-End tests run across the entire repo, but not run on every commit.\",\n \"title\": \"A Carryforward Flag without a specific path?\"\n}\n[/block]\nIf, for example, you have a set of integration tests that test the full repository, but only run on specific commits or pull requests, you can do something like the following as the `paths:` setting\n\n- Unit tests have specific paths\n- Integration tests run on all paths \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Example of a carryforward integration test suite for \\n# for the full repo only run on *some* of the commits\\n\\nflags:\\n unit:\\n paths: #note, accepts globs, not regexes\\n - app/ORM/Models\\n carryforward: false \\n integration:\\n paths:\\n - \\\".*\\\"\\n carryforward: true\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Carryforward Flags in the Codecov UI\"\n}\n[/block]\nOnce your team starts using carryforward flags they will appear in the UI just like normal flags, with the addition of distinctive iconography to set them apart from Codecov's standard flags. For example, carryforward flags can be toggled when viewing source: \n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/cd6b130-cf-flags-in-ui.png\",\n \"cf-flags-in-ui.png\",\n 2084,\n 1216,\n \"#e3e5e0\"\n ],\n \"caption\": \"In this example `flagone` is carried forward and `flagtwo` and `flagthree` are not.\"\n }\n ]\n}\n[/block]\nAdditionally, any coverage that is carried forward will be shown in the Build tab of a the commit that carried the coverage forward. The commit from which the coverage was carried forward is also referenced wherever carryforward flags are shown, like so:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/9bdfc12-cf-flags-in-ui-2.png\",\n \"cf-flags-in-ui-2.png\",\n 2102,\n 1248,\n \"#e3e3e3\"\n ]\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Advanced: Configuring Carryforward Flags in the Code Host\"\n}\n[/block]\n\n### Carryforward Flags in the Pull Request Comment\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"By default, any flags that are carried forward will **not** show up in the pull request / merge request in your code host (Github, Gitlab, or Bitbucket) in the status checks and/or the pull request comments.\\n\\nInstead, only flags that have coverage uploaded **on** the most recent commit will show in the PR Comments.\",\n \"title\": \"Carryforward Flags do not show in the pull request comment by default\"\n}\n[/block]\nBy default flags that are carried forward will *not* appear in the [Pull Request Comment](doc:pull-request-comments).\n\nIf you would like Carryforward Flags to appear in PR comments, use the following YAML configuration under `show_carryforward_flags`.\n\nThe possible settings for:`show_carryforward_flags` are:\n\n* `false` [default]: flags with carried forward coverage will not show up on the flags table\n\n* `true`: if any flag coverage was carried forward, the flags table will have an additional column labeled “Carriedforward” indicating which flags had coverage carried forward\n\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/362f521-image_5.png\",\n \"image (5).png\",\n 1050,\n 340,\n \"#f3f4f5\"\n ],\n \"caption\": \"PR comment with `show_carryforward_flags` set to `true`\"\n }\n ]\n}\n[/block]\n**Example YAML:** \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment: \\n\\n layout: \\\"reach, diff, flags, files” \\n\\n behavior: default require_changes: false \\n # if true: only post the comment if coverage changes \\n\\n require_base: no # [yes :: must have a base report to post] \\n\\n require_head: yes # [yes :: must have a head report to post] \\n\\n branches: # branch names that can post comment \\n\\n - \\\"master\\\"\\n\\n show_carryforward_flags: false\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]","order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2020-03-19T13:17:10.488Z","updatedAt":"2022-03-08T19:52:48.323Z","user":"620a88fb4945600073cd5bce","category":"605e135b517d83006763f4ed","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":8,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-08-05T18:09:31.644Z","parentDoc":null,"deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272557","project":"57b33b5ec9a4551700b969a5","slug":"pull-request-comments","version":"604a3fa3d6d5f0008027258e","__v":12,"excerpt":"Detailed report commented directly into your pull request","title":"Pull Request Comments","createdAt":"2016-08-17T17:39:26.776Z","isReference":false,"next":{"description":"It is important to learn about the Codecov Delta syntax to fully understand pull request comments.","pages":[{"icon":"file-text-o","name":"Codecov Delta","slug":"codecov-delta","category":"Features and UI","type":"doc"}]},"type":"basic","user":"620a88fb4945600073cd5bce","githubsync":"","link_external":false,"order":3,"hidden":false,"link_url":"","parentDoc":null,"sync_unique":"","updates":["5899c42f83f743190077bd04","58adfa02e9b1420f00249398","5c8c4494e6bff8005cd8ec5b","5d3b9c3dc77c64002f5a4cf6","5d936d7b949a430362a03899","5db3ddfe017554005e0eac32","5e3d173e100f2f0024b420d6","5e5ff71dad761601efe35e88","601abb46fcb0e0007dd95fab","60439425e273070068206fbb","609c41af106f4c0379087e43"],"api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","method":"get"},"body":"The Codecov pull request comment is a quick overview of how a pull request (and relevant commits) will affect the code coverage. This simple integration allows developers to see the effects of their work, without having to leave the familiar Github UI. The PR comment provides details on the coverage changes in the pull request that help with speeding up code reviews, and ensuring that all incoming features and fixes are well tested. The comment is customizable to adjust the behavior and logic, as well as the actual output, please see below for configuration details.\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/d7e81e4-Screen_Shot_2017-01-20_at_9.40.15_AM.png\",\n \"Screen Shot 2017-01-20 at 9.40.15 AM.png\",\n 1408,\n 1294,\n \"#f2f3f3\"\n ],\n \"caption\": \"\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Codecov Delta\",\n \"body\": \"It is important to understand what `absolute (impact)` represents. Learn all about the [Codecov Delta](doc:codecov-delta).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Disable comment\"\n}\n[/block]\nTo disable the comment, simply set the top-level `comment` key to `false` in your `codecov.yml`, as shown below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment: false\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nYou can do this in your [Team Yaml](docs:codecov-yaml#section-team-yaml), to take effect on all your repositories.\n\nFor more troubleshooting options, be sure to read about the [Team Bot](https://docs.codecov.io/docs/team-bot) \n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Configuration\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment: # this is a top-level key\\n layout: \\\"reach, diff, flags, files\\\"\\n behavior: default\\n require_changes: false # if true: only post the comment if coverage changes\\n require_base: no # [yes :: must have a base report to post]\\n require_head: yes # [yes :: must have a head report to post]\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"body\": \"Setting the `comment` key to `true` is not a valid configuration, as it will overwrite the default configuration with a boolean value and preclude the sending of any comment.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Layout\"\n}\n[/block]\nCustomize your comment layout by choosing the order and types of components to include. Below is an example of a layout for `reach, diff, flags, files`.\n\n- **Reach** is a coverage graph embedded into the comment.\n - Learn more here: [Graphs: Reach](doc:graphs#section-coverage-reach).\n- **Diff** is the Coverage Diff of the pull request.\n - Learn more here: [Coverage Diff](doc:coverage-diff).\n- **Flags** are a list of user defined [Flags](doc:flags), and the impact on their coverage \n - Learn more about setting up [Flags](doc:flags).\n- **Files** are a list of files that are impacted by the pull request (coverage changes, file is new or removed).\n[block:image]\n{\n \"images\": [\n {\n \"image\": []\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Behavior\"\n}\n[/block]\nChoose the way Codecov submits comments in your pull requests.\n\n- `default`: update, if exists. Otherwise post new.\n- `once`: update, if exists. Otherwise post new. Skip if deleted.\n- `new`: delete old and post new.\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"When updating, the creation date of the comment will stay the same. There will be an `edited` link with a drop-down where you can check the times updated.\",\n \"title\": \"Behavior: default\"\n}\n[/block]\n> Emails will be submitted to all subscribers of the pull request **only when posting a new comment**. There is no way to disable email notifications. This is a limitation of the [Supported CI Providers](doc:supported-ci-providers).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Requiring Changes\"\n}\n[/block]\nYou may desire to change when the comment is posted, if any changes are discovered in coverage.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment:\\n require_changes: true\\n \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nComments will now *only* post when coverage changes. Furthermore, if a comment already exists, and a newer commit results in no coverage change for the entire pull, the comment will be deleted.\n[block:api-header]\n{\n \"title\": \"Requiring the Base and/or Head Commit\"\n}\n[/block]\nYou can force comments to post on pull requests even if Codecov doesn't have coverage reports for either the base or head commit. This generally isn't recommended since, without base and head coverage report information, the resulting comment is not very helpful. \n\nHowever, setting both `require_base` and `require_head` to `no` can allow you to test the ability of Codecov to post a comment to your pull requests without needing to upload coverage for both the base and head commit. \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment:\\n require_head: no # default yes\\n require_base: no # default yes\\n \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"after_n_builds\"\n}\n[/block]\nBy default codecov will post and/or update the pull request comment after it processes each report uploaded for a particular pull request commit. If your CI process uploads many reports to codecov, this can be confusing for team members viewing the pull request as reports are processing. \n\nTo remedy this, you can delay the posting of a pull request comment until a certain number of reports are received and processed by Codecov, using the [`after_n_builds`](doc:notifications#section-preventing-notifications-until-after-n-builds) setting.\n\nGenerally, you should set `after_n_builds` equal to the number of reports you upload per commit. However, this is not required. If `after_n_builds` is greater than the number of reports you upload for a commit, no comment will post. If it is less, the comment will post when `after_n_builds` is reached and (by default) continue to update on each additional report upload.\n[block:api-header]\n{\n \"title\": \"show_carryforward_flags\"\n}\n[/block]\nFor those using the `Carryforward Flags` feature, Carryforward Flags do not show in the pull request comment by default.\n\nYou can configure presence of Carryforward Flags in the flags table via [advanced usage of Carryforward Flags](doc:carryforward-flags#carryforward-flags-in-the-pull-request-comment).","category":"605e135b517d83006763f4ed","updatedAt":"2022-04-27T00:01:54.401Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-02-03T03:51:41.486Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272556","link_url":"","next":{"pages":[],"description":""},"parentDoc":null,"title":"Status Checks","user":"620a88fb4945600073cd5bce","isReference":false,"link_external":false,"version":"604a3fa3d6d5f0008027258e","hidden":false,"order":4,"createdAt":"2016-08-17T15:23:54.660Z","excerpt":"Useful for blocking Pull Requests that don't meet a particular coverage threshold.","project":"57b33b5ec9a4551700b969a5","slug":"commit-status","sync_unique":"","__v":8,"category":"605e135b517d83006763f4ed","body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Project Status\"\n}\n[/block]\nThe `codecov/project` status measures overall project coverage and compares it against the base of the pull request or parent commit.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default:\\n # basic\\n target: auto\\n threshold: 0%\\n base: auto \\n flags: \\n - unit\\n paths: \\n - \\\"src\\\"\\n # advanced settings\\n branches: \\n - master\\n if_ci_failed: error #success, failure, error, ignore\\n informational: false\\n only_pulls: false\\n \",\n \"language\": \"yaml\",\n \"name\": null\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"View the [codecov.yml documentation](doc:codecov-yaml) here.\",\n \"title\": \"New to the Codecov yaml?\"\n}\n[/block]\n### Basic Configuration\n\n#### target\n`auto | `\nChoose a minimum coverage ratio that the commit must meet to be considered a `success`.\n\n- `auto` will use the coverage from the base commit (pull request base or parent commit) coverage to compare against.\n- `` you can specify a target of an exact coverage number such as `75%` or `100%` (`string, int, or float` accepted).\n\n#### threshold\n``\nAllow the coverage to drop by `X%`, and posting a `success` status.\n\n#### base\n[Deprecated as of July 2020 -- Codecov's product roadmap includes a novel way to manually pick base of pull requests]\n\n#### flags\nFlags are a list of user defined Flags, and the impact on their coverage. You can specify an array of flags as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default:\\n #...\\n flags:\\n - flag1\\n - flag2\\n - ...\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nand the combined coverage from those flags will be reported. Before using flags, it is *highly recommended* to [read more about their use](https://docs.codecov.io/docs/flags). \n\n#### paths\nSimilar to flags, an array of paths and/or regular expressions can be provided and the status will report the combined coverage for the files that match the path name / regular expression. \n\n### Advanced Configuration\nWhile Codecov defaults should be sufficient for most use cases, below are some advanced features to personalize your experience even more.\n\n#### branches\nThe branches that, when used, will trigger this status.\n\n#### if_not_found\nSettings are 'success' and 'failure' the default is 'success'. \n\n* `failure`: the status will fail if there is no report for the head\n* `success`: the status will pass if there is no report for the head. Use this on commits / PRs where you won't be uploading coverage but still want codecov status checks to pass. \n\n#### informational\nUse Codecov in informational mode. Default is `false`. If `true` is specified the resulting status will pass no matter what the coverage is or what other settings are specified. Informational mode is great to use if you want to expose codecov information to other developers in your pull request without necessarily gating PRs on that information. \n\n#### only_pulls\nOnly post a status to pull requests, defaults to `false`. If `true` no status will be posted for commits not on a pull request\n\n#### if_ci_failed\nOptions are:\n* `error`: Will set the status to success only if the CI is successful\n* `success`: Will set the status to success even if the CI fails\n\n#### flag_coverage_not_uploaded_behavior\nDetermines how we handle status checks for which no flag coverage has been newly uploaded on a commit. This includes status checks where flags have carriedforward coverage (since coverage was no newly uploaded), as well as flags for which coverage is missing entirely. \nOptions are:\n* `include`: (default) All the status checks defined in the YAML file will be processed and sent as normal.\n* `exclude`: Status checks that haven't newly uploaded any flag coverage will not be sent.\n* `pass`: Status checks that haven't newly uploaded any flag coverage will be passed automatically.\n\nThis is useful if, for example, you're working on a project in a monorepo and don't want to see status checks related to other projects.\nNote that this only applies to status checks that specify flags. If there are no flags on a check, the status check will be processed as usual.\n\n### Excluding status checks for unrelated projects (Example)\n\nBelow is an example of using the `flag_coverage_not_uploaded` behavior to omit status checks from unrelated projects.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n default_rules:\\n flag_coverage_not_uploaded_behavior: exclude # don't send status checks that don't have flag coverage uploaded\\n project:\\n projectA:\\n target: auto\\n flags:\\n - projectA-unit\\n - projectA-integration\\n projectB:\\n target: auto\\n flags:\\n - projectB\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIn this example, if a PR is opened in `projectB` then the status check for `projectA` won't be sent, as long as no coverage for `projectA` was uploaded on the PR. \nNote that this requires that the CI process in `projectB` only uploads to Codecov using the `projectB` flag, and does not upload anything under the `projectA` flag. If your CI runs all tests and uploads coverage for every flag specified in the YAML file on every commit, then all status checks will appear as normal.\n\n### Excluding tests (Example)\n\nBelow, is an example of using multiple project statuses that measure different aspects of your project.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default: false # disable the default status that measures entire project\\n tests: # declare a new status context \\\"tests\\\"\\n target: 100% # we always want 100% coverage here\\n paths: \\\"tests/\\\" # only include coverage in \\\"tests/\\\" folder\\n app: # declare a new status context \\\"app\\\"\\n paths: \\\"!tests/\\\" # remove all files in \\\"tests/\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nNow you will see two unique status contexts from Codecov: `codecov/project/tests` and `codecov/project/app`.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4e3314a-5e470ee8-607f-11e6-830a-aebbee527a2e.png\",\n \"5e470ee8-607f-11e6-830a-aebbee527a2e.png\",\n 1416,\n 526,\n \"#fafafa\"\n ],\n \"caption\": \"\"\n }\n ]\n}\n[/block]\n### Splitting up projects (Example)\n\nYou may have a code base that has multiple application components that you would like to monitor independently. Codecov provides a very simple way create statuses for each component.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n users:\\n paths:\\n - tests/users\\n - app/components/user*\\n products:\\n paths:\\n - tests/products\\n - app/components/product*\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/9540720-59f0a92e-6081-11e6-8816-7b67922aaa90.png\",\n \"59f0a92e-6081-11e6-8816-7b67922aaa90.png\",\n 1412,\n 708,\n \"#f9f9f9\"\n ],\n \"caption\": \"As illustrated above, you can set project statuses filtering out specific components of the application, and get 3 unique statuses monitoring each component.\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Patch Status\"\n}\n[/block]\nThe `codecov/patch` status **only** measures lines adjusted in the pull request or single commit, if the commit is not in a pull request. This status provides an indication on how well the pull request is tested. \n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n patch:\\n default:\\n # basic\\n target: auto\\n threshold: 0%\\n base: auto \\n # advanced\\n branches: \\n - master\\n if_ci_failed: error #success, failure, error, ignore\\n only_pulls: false\\n flags: \\n - \\\"unit\\\"\\n paths: \\n - \\\"src\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nTo illustrate the usage of the patch status, let's go through this exercise.\n\n```diff\n def divide(x, y):\n+ if y <= 0:\n+ raise ValueError(\"y must be greater than 0\")\n return x * y\n```\n\nThe resulting `codecov/patch` status of this commit would be `0% covered` because no tests are created for this method. Even though the project coverage is 72% (the entire code base not shown), this patch status will only measure lines added.\n\nTo make another commit on this pull request, adding tests, proceed as follows.\n\n```diff\n+ def test_divide_by_1(self):\n+ assert divide(10, 1) == 10\n```\n\nRunning the tests will result in a patch coverage of `50% covered` because we have not yet tested the behavior of dividing by zero. Let's add another test.\n\n\n```diff\n def test_divide_by_1(self):\n assert divide(10, 1) == 10\n\n+ def test_divide_by_zero(self):\n+ with self.assertRaises(ValueError)\n+ divide(1, 0)\n+\n```\n\nNow Codecov will report a `codecov/patch` status of `100% covered` for this pull request. This indicates that the pull request adjusted code is properly executed by tests.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Disabling a status\"\n}\n[/block]\nYou may choose to disable the default statuses Codecov posts by using the following yaml configuration.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Enabling a status\",\n \"body\": \"Note that you can not enable a status by setting it to yes, you need to define it by using [the structure described here](doc:commit-status#section-project-status)\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project: off\\n patch: off\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Changes Status\"\n}\n[/block]\nCodecov will detect changes in coverage that are **NOT** included in the commit/pull diff, and report these changes as a commit status.\n\nLet's take this example to illustrate what an [Unexpected Coverage Changes](doc:unexpected-coverage-changes) would look like.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/7069367-Screen_Shot_2016-10-07_at_7.57.52_AM.png\",\n \"Screen Shot 2016-10-07 at 7.57.52 AM.png\",\n 796,\n 174,\n \"#dbf9db\"\n ],\n \"caption\": \"First commit. 100% coverage.\"\n }\n ]\n}\n[/block]\nAs shown above, we have 100% coverage. Now let's make a change to this code base.\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/9bfd545-Screen_Shot_2016-10-07_at_8.00.36_AM.png\",\n \"Screen Shot 2016-10-07 at 8.00.36 AM.png\",\n 854,\n 262,\n \"#f7ebed\"\n ],\n \"caption\": \"Second commit's diff.\"\n }\n ]\n}\n[/block]\nOur CI will run and result in the following:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/d007b7d-Screen_Shot_2016-10-07_at_8.01.50_AM.png\",\n \"Screen Shot 2016-10-07 at 8.01.50 AM.png\",\n 536,\n 112,\n \"#f8cccc\"\n ],\n \"caption\": \"Second commit's coverage.\"\n }\n ]\n}\n[/block]\nLines 1 and 2 are considered \"changes\" in Codecov. This status would detect these changes and report them to the commit status.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/fff04c4-Screen_Shot_2016-10-07_at_8.05.59_AM.png\",\n \"Screen Shot 2016-10-07 at 8.05.59 AM.png\",\n 898,\n 78,\n \"#f8f9f9\"\n ]\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"default_rules\"\n}\n[/block]\nA top-level `default_rules` field can be added to specify some behaviors to be applied by default to every status check, unless the status check definition itself explicitly sets a different behavior. \nThis can be useful for setting a behavior at a global level for all checks without needing to manually go through the definition of every individual checks. This can also be useful if you want to specify a global behavior but also make exceptions for individual checks.\n\nExample:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n default_rules:\\n flag_coverage_not_uploaded_behavior: exclude # this behavior will be applied to all checks by default\\n project:\\n projectA:\\n flags:\\n - projectA\\n projectB:\\n flags:\\n - projectB\\n projectC:\\n flag_coverage_not_uploaded_behavior: include # this behavior will be applied only to this status check\\n flags:\\n - projectC\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIn this example, the `exclude` behavior for the `flag_coverage_not_uploaded_behavior` setting will be applied to projectA and projectB, but the `include` behavior will be applied to projectC because that project's YAML configuration explicitly sets a different value for that setting.\n\n## Fields that can be set under `default_rules`\n\nNot all the status check configuration options can be set at a global level like this with `default_rules`. Currently only the following fields are supported:\n\n* `flag_coverage_not_uploaded_behavior`","githubsync":"","type":"basic","updates":["58ae01ccd0a8091900dddb74","58ae121585a62c0f005e15c0","5d36e884f4498b004a4e01dd","5e85bdf5d3982b0022696806","5f372dbf2003fa006f9dcc63","5fd7c7a4b3e354005e5790b2","60d05727f19d5b007845b9f3","60d05893497ff50010c0de08"],"api":{"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"updatedAt":"2022-05-23T17:08:42.158Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-08-15T00:32:05.727Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272587","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"GitHub Checks","updates":["5fcade1a014d7b004c6592f9"],"type":"basic","slug":"github-checks","excerpt":"","body":"GitHub Checks is meant to provide meaningful code coverage metrics as close to your workflow as possible. This is done by providing line-by-line coverage on your GitHub pull requests so you can access code coverage insights without leaving your code.\n\nThis feature is only available for GitHub users as it leverages [GitHub Checks](https://github.blog/2018-05-07-introducing-checks-api/).\n\n\n\n\n\n## Annotations in the \"Files Changed\" View\n\n\n\nNotably, lines that you add on a commit without coverage, will show up in your pull request files view with an annotation. \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b4b2a84-Google_Chrome_2020-09-11_10-17-112x.png\",\n \"Google Chrome_2020-09-11 10-17-11@2x.png\",\n 3538,\n 1834,\n \"#f7f7f8\"\n ],\n \"caption\": \"Added line without coverage annotated in GitHub\"\n }\n ]\n}\n[/block]\n\n\n\n### Hiding Annotations in the Files View\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Annotations making your code hard to read?\",\n \"body\": \"You can always just [toggle them on and off](https://twitter.com/natfriedman/status/1366417484698578953?s=21) with the \\\"a\\\" key\"\n}\n[/block]\nYou can always hide annotations in the GitHub Files view by unselecting \"Show annotations\" in the top right of the file. \n\nThis GitHub feature only hides annotations by file, not for the full pull request.\n\nYou can also toggle [checks on and off](https://twitter.com/natfriedman/status/1366417484698578953?s=21) by pressing the \"a\" key. \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/e1f2484-image.png\",\n \"image.png\",\n 3548,\n 1270,\n \"#f6f6f6\"\n ],\n \"caption\": \"Hiding Codecov Annotations in Files view\"\n }\n ]\n}\n[/block]\n## Annotations in the \"Checks\" Tab\n\n\nTo see annotations, first, go to the `Checks` tab under any pull request.\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/a9f0aca-annotations1.png\",\n \"annotations1.png\",\n 1600,\n 773,\n \"#f8f8f9\"\n ]\n }\n ]\n}\n[/block]\nLook for a `patch` status underneath the `CodecovChecks` dropdown.\n\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3b04365-annotations2.png\",\n \"annotations2.png\",\n 1600,\n 929,\n \"#acadb0\"\n ]\n }\n ]\n}\n[/block]\nTo view coverage information in line with your code, click on the icon to the right side of the annotation. \n\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/ca949f0-annotations3.png\",\n \"annotations3.png\",\n 1600,\n 951,\n \"#f5f5f8\"\n ]\n }\n ]\n}\n[/block]\n## YAML Configuration for GitHub Checks and Codecov\n\n\nGitHub Checks and annotations for the [patch status](https://docs.codecov.io/docs/commit-status#patch-status) are enabled by default for all GitHub users. \n\n`Patch` [Commit Statuses](https://docs.codecov.io/docs/commit-status) have to be enabled and set up in order for checks to be present in pull requests.\n\nIf you have disabled `patch status` in your YAML, Github Checks Annotations will not show up. \n\nFor example, Github Checks Annotations would be **off** if your YAML was: \n\n```\ncoverage:\n status:\n patch: false\n```\n\n\n\n\n### Disabling GitHub Checks Patch Annotations via YAML\n\nAnnotations can be disabled using a flag on the top-level section of the [codecov.yml](https://docs.codecov.io/docs/codecov-yaml) file.\n\n```\ngithub_checks:\n annotations: false\n```\n\nNote: If GitHub checks are disabled but statuses are still set up, normal status checks will be used instead.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Self-hosted Codecov Admins\",\n \"body\": \"GitHub Checks Patch Annotations may be disabled by default in your instance. If you are not seeing them, and you don't have an entry on your yaml, try setting the above to `true` at either the instance and repo level codecov.yml.\"\n}\n[/block]\n### Disabling GitHub Checks completely via YAML\n\nIf you want to disable the GitHub checks complete and revert to the older statuses, you can set the following flag on the top-level section of the [codecov.yml](https://docs.codecov.io/docs/codecov-yaml) file.\n\n```\ngithub_checks: false\n```\n\nIf Disabling checks is something that you need or want, we'd love if you could also [drop us a ticket](https://codecov.freshdesk.com/support/tickets/new) explaining how we can improve this feature to better suit your needs.","order":5,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"github-checks-beta","slugUpdatedAt":"2021-03-29T12:36:17.536Z","createdAt":"2020-08-11T16:06:44.161Z","updatedAt":"2021-04-21T23:34:53.855Z","user":"5d2df7be2fc9ec00552ec020","category":"605e135b517d83006763f4ed","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":1,"parentDoc":null,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272542","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{}"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","method":"get"},"createdAt":"2016-08-17T11:25:56.285Z","parentDoc":null,"__v":7,"githubsync":"","hidden":false,"link_url":"","type":"basic","body":"Through our partnership with Sourcegraph, a free and open source tool, Codecov users can overlay code coverage directly in their code host of choice. Utilization of the Sourcegraph extension to overlay coverage in GitHub requires membership of a Sourcegraph account.\n\n{NOTE Sourcegraph + Codecov for GitLab and Bitbucket users is under development. Thanks for your patience!}\n\n\n[block:api-header]\n{\n \"title\": \"Installation steps\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"\",\n \"body\": \"**[Sourcegraph + Codecov installation here (GitHub)\\n](https://github.com/codecov/sourcegraph-codecov/blob/master/README.md)**\"\n}\n[/block]\n\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=j1eWBa3rWH8\",\n \"title\": \"Sourcegraph Extensions Codecov Demo (Alpha)\",\n \"favicon\": \"https://s.ytimg.com/yts/img/favicon-vfl8qSV2F.ico\",\n \"image\": \"https://i.ytimg.com/vi/j1eWBa3rWH8/hqdefault.jpg\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Additional steps for on-premises Codecov customers\"\n}\n[/block]\nYou can use Sourcegraph to support code coverage overlays from Codecov Enterprise directly in GitHub Enterprise:\n1. Follow the [Codecov extension usage instructions](https://github.com/codecov/sourcegraph-codecov#usage) above to install Sourcegraph for Chrome/Firefox\n2. From the command palette (added by the Sourcegraph browser extension, see screenshot below) on GitHub Enterprise click, **\"Codecov: Setup up Codecov Enterprise\" **\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b50ea85-2.3._Sourcegraph_on_Github_Enterprise_-_click_setup_Codecov_Enterprise.png\",\n \"2.3. Sourcegraph on Github Enterprise - click setup Codecov Enterprise.png\",\n 2024,\n 1596,\n \"#e7eaed\"\n ]\n }\n ]\n}\n[/block]\n3. From the pop up that appears, set your Version control type to: `ghe`\n4. From the next pop up that appears, set your Codecov endpoint, this is just the root level of your Codecov Enterprise domain, e.g., `https://codecov.mycompany.com`. \n5. Go to the command palette on GitHub and choose **\"Codecov: Set API token for private repositories\"**\n6. Enter your Codecov Enterprise API token. You can get a token by navigating to your account page on Codecov Enterprise and selecting \"Access\" from the menu on the left, and then clicking the green **\"Create\"** button from the page that appears. \n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/2985c83-createcodecovtoken.png\",\n \"createcodecovtoken.png\",\n 1152,\n 382,\n \"#f4f1f5\"\n ]\n }\n ]\n}\n[/block]\n7. Visit any file in your GitHub Enterprise install with coverage data uploaded to Codecov Enterprise to see coverage data. \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/87ed320-CCEGHE.png\",\n \"CCEGHE.png\",\n 2024,\n 1215,\n \"#e0e6e4\"\n ]\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Additional steps for enterprise Sourcegraph + on-premises Codecov customers\"\n}\n[/block]\n{NOTE Sourcegraph + Codecov for on-premises Codecov users is under development. Thanks for your patience!}\n[block:api-header]\n{\n \"title\": \"FAQ\"\n}\n[/block]\n**What type of browsers does Sourcegraph support?**\n\nAs of October 2018, Sourcegraph supports Chrome and Firefox.\n\n**Will Sourcegraph read my repositories?** \n\nYour code is never sent to Sourcegraph. The Codecov extension runs on the client side in a Web Worker and communicates with Codecov directly to retrieve code coverage data. The Codecov API token is saved in your Chrome/Firefox profile and is not sent to Sourcegraph.","category":"605e135b517d83006763f4ed","excerpt":"Overlay reports directly in GitHub, GitLab and Bitbucket through the Sourcegraph extension","isReference":false,"next":{"pages":[],"description":""},"order":6,"project":"57b33b5ec9a4551700b969a5","updates":["57b5894ed991192200cdd03e","58adf753e9b1420f00249392","5c98a7d18af84d018ea5d382","5d5dddb865b4330036dcb889","5f7b83978c0e9d0035006872","5f7b87745048af02abd482d6","601ab57bdaf176006429dc09","606ef25eb41306007511fe7e"],"user":"620a88fb4945600073cd5bce","link_external":false,"slug":"browser-extension","sync_unique":"","title":"Browser Extension (Sourcegraph)","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-05-06T22:44:56.120Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-05T20:33:06.228Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027255d","createdAt":"2016-08-17T14:25:12.538Z","isReference":false,"next":{"pages":[],"description":""},"updates":["58ae14244e26a80f006ee6db","5bc535a0e17fba000d05fc10","5d38aa0aadb420002afcc1ad","5d49a24e0efb310014afca98","5e4a995f201c970012c2aff8","5e70e06a67b858003136a180","5fa1c6976d27890044f9600a","60d059630d3d040033cf156e","60d3bb9d2ce5d5001ccc2733"],"api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"slug":"fixing-paths","sync_unique":"","type":"basic","link_external":false,"link_url":"","order":8,"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","user":"5b47e58599e0430003d8e823","githubsync":"","body":"# Introduction\n\nFor Codecov to operate properly, all files paths in the coverage report must match the git/hg file structure. This approach is how Codecov is able to correctly map coverage information in your uploaded coverage reports to the corresponding files in your repository. \n\nIt is incredibly common, and encouraged, for users to run tests in their CI environments and then upload coverage directly to Codecov as a step in their CI process. This can lead to problems, however, because the paths to files in a coverage report generated during CI will map to the *CI's file system*. This mapping may not necessarily map to the file structure of your project in git/hg. When this is the case, Codecov will fail to properly process your reports. Codecov's path fixing feature was built to address this problem.\n\n# How do I know if I should use Path Fixing?\n\nGenerally if your uploaded reports fail to process, path fixing may help. You should download the coverage report generated within your CI for a particular commit, examine the file paths located within it, and see if they map directly to your git/hg file structure. If not, you can attempt to apply a path fix and see if this helps on subsequent commits.\n\n# An Example of Path Fixing\nFor example, CircleCI, will clone your project to `home/circleci/project` and run all tests relative to that directory, meaning your generated coverage report will reference a file as `/home/circleci/project/path/to/file.py`. which doesn't match the path `/project/path/to/file.py` in your project. \n\nIn many cases, such as with CircleCI above, Codecov has internal methods of mapping paths, so the user is never even aware that paths are being modified in order to map coverage information to their project correctly. However, it is impossible for Codecov to do this for every CI and/or build scenario engineering teams may use. \n\n# How to Provide Path Fixes Manually\nIn the event that your files are failing to process, Codecov provides path fixing to allow engineering teams to manually map the file paths in their coverage reports to their project's git/hg structure. \n\nTeams can update a repo level codecov.yml to concretely specify:\n\n`- ::`\n\nThe path fixing options are as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"fixes:\\n - \\\"before/::after/\\\" # move path e.g., \\\"before/path\\\" => \\\"after/path\\\"\\n - \\\"::after/\\\" # move root e.g., \\\"path/\\\" => \\\"after/path/\\\"\\n - \\\"before/::\\\" # reduce root e.g., \\\"before/path/\\\" => \\\"path/\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nRegexp and glob pattern matching are allowed in the fixes:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"fixes:\\n - \\\"before/test-*::after/\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThe pattern above will move files in the following manner.\n\n```\nbefore/tests-apples/test.js => after/test.js\nbefore/tests-oranges/test.js => after/test.js\nbefore/app-apples/app.js => before/app-apples/app.js\n```\n\nAs a concrete use case, using the CircleCI example above, Codecov provides the following path fix automatically for CircleCI users:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"fixes:\\n - \\\"/home/circleci/::\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n# Disable default path fixing\n\nTo disable Codecov's built-in path fixing, you can add the following to your [codecov.yml](doc:codecovyml-reference) file.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n disable_default_path_fixes: true\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]","category":"605e135b517d83006763f4ed","excerpt":"","hidden":false,"title":"Path Fixing","version":"604a3fa3d6d5f0008027258e","__v":9,"updatedAt":"2021-07-07T13:02:48.325Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-08-11T18:59:11.233Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027255e","isReference":false,"next":{"pages":[],"description":""},"user":"57b33af9eeec08220094ea97","__v":1,"category":"605e135b517d83006763f4ed","updates":["58ae152385a62c0f005e15cc"],"body":"The Codecov Yaml accepts regexp patterns to filter report content. Detailed below is the strategy of how codecov processes these paths.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Regexp patterns\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Status Checks and Flags do not support Regex rules\",\n \"body\": \"At this time, the Codecov [Flags](doc:flags) and [Status Checks](doc:commit-status) features do not accept regex-based paths\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Before\",\n \"h-1\": \"After\",\n \"0-0\": \"`/path`\",\n \"0-1\": \"include `^path.*`\",\n \"1-0\": \"`path/`\",\n \"1-1\": \"include `^path/.*`\",\n \"2-1\": \"include `^path/.*`\",\n \"2-0\": \"`path/*`\",\n \"3-0\": \"`path/to/file.rb$`\",\n \"3-1\": \"include `^path/to/file.rb$`\",\n \"4-0\": \"`*/tests`\",\n \"4-1\": \"include `.*/tests.*`\",\n \"5-0\": \"`!path`\",\n \"5-1\": \"exclude `^path.*`\"\n },\n \"cols\": 2,\n \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Logic\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"if any negative match:\\n skip\\nelse if has positive matches:\\n if positive match found:\\n include\\n else:\\n skip\\nelse:\\n include\\n\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]","excerpt":"Outlining our regular expression technique used","createdAt":"2016-09-15T14:45:49.056Z","hidden":false,"link_url":"","slug":"path-regexp","title":"Path Regexp","api":{"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null},"order":9,"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","sync_unique":"","type":"basic","version":"604a3fa3d6d5f0008027258e","githubsync":"","link_external":false,"updatedAt":"2021-12-15T16:25:44.147Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027255c","hidden":false,"link_external":false,"version":"604a3fa3d6d5f0008027258e","project":"57b33b5ec9a4551700b969a5","sync_unique":"","user":"620a88fb4945600073cd5bce","__v":2,"category":"605e135b517d83006763f4ed","excerpt":"","order":10,"type":"basic","updates":["58ae12e385a62c0f005e15c2","60b9608610710e006a6cb6f1"],"createdAt":"2016-08-17T14:25:03.904Z","githubsync":"","isReference":false,"slug":"ignoring-paths","parentDoc":null,"title":"Ignoring Paths","api":{"params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"code":"{}","language":"json","status":400,"name":""}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"body":"You can use the top-level `ignore:` key to tell Codecov to ignore certain paths.\n\nAdd a list of paths (folders or file names) to your codecov.yml file under the ignore key to exclude files from being collected by Codecov. Ignored files will be skipped during processing. \n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Things to note\",\n \"body\": \"File paths will be read as regex patterns, so special characters in regex will need to be escaped using `\\\\\\\\` prior to the character, an example being `+` which would require `\\\\\\\\+` to be processed correctly. \\n\\nThe pattern `folder/*` will **not** match recursively in the folder. \\nPlease use this `folder/**/*`, which will exclude all files within the given folder.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# sample regex patterns\\nignore:\\n - \\\"path/to/folder\\\" # ignore folders and all its contents\\n - \\\"test_*.rb\\\" # wildcards accepted\\n - \\\"**/*.py\\\" # glob accepted\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThe following are examples of different rules and how they behave followed by a corresponding directory with the ignored files called out for clarity. \n[block:api-header]\n{\n \"title\": \"Ignoring a Specific Folder\"\n}\n[/block]\nThis rule will ignore everything in the top level project2 folder and everything underneath it, but will NOT ignore project 2 underneath the src/ folder.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"ignore:\\n\\t- \\\"project2\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n**Sample file tree:**\n```\n├── src/\n ├── project1/\n ├── 1A.py\n ├── 1B.py\n ├── 1C.py\n ├── coverage/\n ├── coverage.xml\n ├── project2/\n ├── 2A.py\n ├── 2B.py\n ├── 2C.py\n ├── coverage/\n ├── coverage.xml\n ├── project3/\n ├── 3A.py\n ├── test_3A.rb\n ├── 3B.py\n ├── test_3B.rb\n ├── 3C.py\n ├── test_3C.rb\n ├── coverage/\n ├── coverage.xml\n├── project2/\n ├── 2A.py\n ├── 2B.py\n ├── 2C.py\n ├── coverage/\n ├── coverage.xml\n```\n**Ignored files:**\n * project2/2A.py\n * project2/2B.py\n * project2/2C.py\n * project2/coverage/coverage.xml \n[block:api-header]\n{\n \"title\": \"Ignoring Specific Files At All Depths\"\n}\n[/block]\nThis rule will ignore any files at any depth that start with \"test_\" and end with \".rb\".\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"ignore:\\n\\t- \\\"**/test_*.rb\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n**Sample file tree:**\n```\n├── src/\n ├── project1/\n ├── 1A.py\n ├── 1B.py\n ├── 1C.py\n ├── project2/\n ├── 2A.py\n ├── 2B.py\n ├── 2C.py\n ├── project3/\n ├── 3A.py\n ├── test_3A.rb\n ├── 3B.py\n ├── test_3B.rb\n ├── 3C.py\n ├── test_3C.rb\n├── project4/. \n ├── test_4A.rb \n ├── test_4B.rb\n ├── test_4C.rb\n```\n**Ignored files:**\n * src/project3/test_3A.rb\n * src/project3/test_3B.rb\n * src/project3/test_3C.rb\n * project4/test_4A.rb\n * project4/test_4B.rb\n * project4/test_4C.rb\n[block:api-header]\n{\n \"title\": \"Ignoring Specific File Types\"\n}\n[/block]\nThis rule will ignore any file at any depth that ends in \".py\".\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"ignore:\\n\\t- \\\"**/*.py\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n**Sample file tree:**\n```\n├── src/\n ├── project1/\n ├── 1A.py\n ├── 1B.py\n ├── 1C.py\n ├── project2/\n ├── 2A.py\n ├── 2B.py\n ├── 2C.py\n ├── project3/\n ├── 3A.py\n ├── test_3A.rb\n ├── 3B.py\n ├── test_3B.rb\n ├── 3C.py\n ├── test_3C.rb\n├── project4/. \n ├── test_4A.rb \n ├── test_4B.rb\n ├── test_4C.rb\n```\n**Ignored files:**\n * src/project1/1A.py\n * src/project1/1B.py\n * src/project1/1C.py\n * src/project2/2A.py\n * src/project2/2B.py\n * src/project2/2C.py\n * src/project3/3A.py\n * src/project3/3B.py\n * src/project3/3C.py\n[block:api-header]\n{\n \"title\": \"Ignoring Specific File Names\"\n}\n[/block]\nThis rule will ignore any folders and files in any folder called \"coverage\".\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"ignore:\\n\\t- \\\"**/coverage\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n**Sample file tree:**\n```\n├── src/\n ├── project1/\n ├── 1A.py\n ├── 1B.py\n ├── 1C.py\n ├── coverage/\n ├── coverage.xml\n ├── project2/\n ├── 2A.py\n ├── 2B.py\n ├── 2C.py\n ├── coverage/\n ├── coverage.xml\n ├── project3/\n ├── 3A.py\n ├── test_3A.rb\n ├── 3B.py\n ├── test_3B.rb\n ├── 3C.py\n ├── test_3C.rb\n ├── coverage/\n ├── coverage.xml\n├── project2/. \n ├── 2A.py \n ├── 2B.py\n ├── 2C.py\n ├── coverage/\n ├── coverage.xml\n├── coverage/\n ├── coverage.xml \n```\n**Ignored files:**\n* src/project1/coverage/coverage.xml\n* src/project2/coverage/coverage.xml\n* src/project3/coverage/coverage.xml\n* project2/coverage/coverage.xml \n* coverage/coverage.xml","link_url":"","next":{"pages":[],"description":""},"updatedAt":"2022-03-24T22:41:08.930Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-06-03T21:26:58.193Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272558","__v":5,"body":"[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Notice about delayed notifications\",\n \"body\": \"Codecov delays notifications to make sure all reports are uploaded. Learn more at [Merging Reports](doc:merging-reports).\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Customization of pull request comments?\",\n \"body\": \"If you are looking to customize your `comments`, including turning them `off`, please see [Pull Request Comments](https://docs.codecov.io/docs/pull-request-comments)\"\n}\n[/block]\nCodecov can send notifications to a variety of different services, all outlined below. For each service, there are a collection of standard fields in addition to fields custom to that service. \n\nThis page will first define the custom fields common to all notification systems and then define each service level notification setting in its relevant provider category. \n\nCurrent supported notification providers out of the box are:\n\n* Gitter\n* IRC\n* Slack\n\nYou may be able to interact with other types of notification providers using our Standard Notification Fields (below).\n[block:api-header]\n{\n \"title\": \"Standard Notification Fields\"\n}\n[/block]\n_Note that these standard fields can be supplied for any of the providers defined below._\n\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"url: \\\"https://url.to.service\\\"\\nbranches': \\n - master\\n - dev\\n - staging\\nthreshold': 1%\\nflags: \\n - backend\\n - frontend\\nbase: \\\"parent\\\"\\nonly_pulls: false\\npaths: \\\"*/**/*\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n#### url\nThe url to the service, not necessarily applicable to all providers, such as IRC.\n\n#### branches\nThe branches you for which you would like to send notifications. Defaults to all branches\n\n#### threshold\nThe coverage threshold on which you would like to send a notification. If the coverage changes by more than the amount in the threshold field, a notification will be sent, otherwise it will not. Default to `None`, which means that notifications will always be sent regardless of coverage change amount. \n\n#### flags\nSpecify the flags for which you would like notifications to be sent. Defaults to all flags. see: [Flags](https://docs.codecov.io/docs/flags)\n\n#### base\nThe base commit type to which you would like to send notifications. Options are `'parent'`,`'pr'`, and `'auto'`.\n\n* `parent`: compare the commit being notified on to its direct parent\n* 'pr': compare the commit being notified on to the base of a PR if the commit is in a PR. \n* 'auto': automatically choose the appropriate comparison. If the commit being notified on is in a PR, `pr` will be used, otherwise `parent` will be used. This is the default. \n\n#### only_pulls\nNotify only on pull requests, default is `False`\n\n#### paths\nOnly send a notification if the specified file paths change. Augments the flags setting. If both `flags` and `paths` are specified, a notification will be triggered if files covered by the supplied flags OR paths change. \n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Slack\"\n}\n[/block]\nBelow is a basic configuration for adding a Slack notification.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n notify:\\n slack:\\n default:\\n url: \\\"https://hooks.slack.com/services/abc/123\\\"\\n threshold: 1%\\n only_pulls: false\\n branches: \\n - \\\"master\\\"\\n flags: \\n - \\\"unit\\\"\\n paths: \\n - \\\"src\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Create a Slack Webhook URL\n\n1. Navigate to [https://slack.com/apps](https://slack.com/apps).\n2. Search for `incoming webhook` and click on the Incoming WebHooks result.\n3. Click **Add Configuration**.\n4. Follow the instructions to select a room and click **Add Incoming Webhooks Integration**.\n5. Copy the **Webhook URL** into your yaml.\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"Next: [Advanced Notification Configuration](#section-advanced-configuration).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Gitter\"\n}\n[/block]\nHere is demonstrated the basic configuration for adding a Gitter notification.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n notify:\\n gitter:\\n default:\\n url: \\\"https://webhooks.gitter.im/e/9d1957r0a481787c756z\\\"\\n threshold: 1%\\n only_pulls: false\\n branches: \\n - \\\"master\\\"\\n flags: \\n - \\\"unit\\\"\\n paths: \\n - \\\"src\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Create a Gitter Integration URL\n\n1. Navigate to your room in Gitter. ex. https://gitter.im/codecov/support.\n2. Click **Room Settings** icon (top-right corner).\n3. Click **Integrations** from the dropdown.\n4. Click on **Codecov** from the integration list.\n5. Copy the webhook url into your yaml.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Advanced Configuration\"\n}\n[/block]\nAll Codecov notifications can be customized. The advanced configuration shown below can be applied to any of the notifications services.\n\n## Multiple Notifications\nYou may create additional notifications that post to different channels with different coverage metrics.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n notify:\\n slack:\\n frontui:\\n url: \\\"https://hooks.slack.com/services/T04KHQ16W/B225J94BG\\\"\\n flags:\\n - frontend\\n - ui\\n backunit:\\n url: \\\"https://hooks.slack.com/services/T04KHQ16W/B225J94BG\\\"\\n threshold: 2% # allow coverage to drop by 2% without posting a notification\\n flags:\\n - backend\",\n \"language\": \"yaml\",\n \"name\": null\n }\n ]\n}\n[/block]\nNotice how we added two unique notifications. Each of them are measuring different reports based on [Flags](https://docs.codecov.io/docs/flags).\n\n## Preventing notifications until after `N` builds\n\nYou may want to prevent any notifications until after a known number of builds. The `after_n_builds` option delays notifications for a given commit until a certain number of uploads have been received and processed by Codecov. Some common use cases are:\n\n1. Parallel CI setups\n2. Long running CI pipelines that upload to Codecov multiple times\n\nTo use `after_n_builds` in your YAML, follow this example:\n\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n notify:\\n after_n_builds: 5\\n# do not notify until at least 5 builds have been uploaded from the CI pipeline\\n# you can also set after_n_builds on comments independently\\ncomment:\\n after_n_builds: 4\",\n \"language\": \"yaml\",\n \"name\": \"YAML\"\n }\n ]\n}\n[/block]\nIn this YAML, at least 5 builds would need to be received before Codecov would push a notification.","isReference":false,"link_url":"","next":{"pages":[],"description":""},"order":11,"sync_unique":"","title":"Notifications","type":"basic","api":{"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"excerpt":"","githubsync":"","project":"57b33b5ec9a4551700b969a5","user":"5b95e8b206ca8a00031f1401","version":"604a3fa3d6d5f0008027258e","createdAt":"2016-08-17T14:01:01.132Z","hidden":false,"link_external":false,"parentDoc":null,"slug":"notifications","updates":["58ae092bba7e650f00726f81","58ae09a9ba7e650f00726f82","5e9f398611fc53003895b66f","5eaafad7779d30028e20b885","602be1e00452470041b365ac"],"category":"605e135b517d83006763f4ed","updatedAt":"2021-02-22T15:23:05.574Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-02-16T04:06:40.842Z","children":[],"childrenPages":[]},{"_id":"61116c9f500b9b006bfd6e12","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Organization analytics","updates":[],"type":"basic","slug":"organization-analytics","excerpt":"Org-level or cross-repo analytics is available to see at codecov.io","body":"This feature is accessible from the organization overview page (see below), and allows users to aggregate coverage information across repositories within a single organization, team, or subgroup.\n\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/77789df-f8a7ffc-analytics-nav-tab.png\",\n \"f8a7ffc-analytics-nav-tab.png\",\n 2322,\n 770,\n \"#dbdada\"\n ],\n \"caption\": \"Analytics Navigation in the top nav of Codecov’s organization view (e.g., https://codecov.io//)\"\n }\n ]\n}\n[/block]\nRepository Coverage can be grouped by date range, and all or a subset of repositories in the group can be selected.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/178601e-321df85-analytics-page.png\",\n \"321df85-analytics-page.png\",\n 2152,\n 1837,\n \"#faf5f6\"\n ],\n \"caption\": \"The Codecov Analytics Page showing the aggregated coverage of two repositories\"\n }\n ]\n}\n[/block]\nCodecov Analytics provides an excellent lens for engineers and managers to understand the holistic coverage of all or parts of their engineering organization. With Codecov Analytics it is now possible to monitor organizational coverage targets over time and as a part of broader code quality initiatives.","order":12,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-08-09T17:21:19.518Z","createdAt":"2021-08-09T17:57:51.178Z","updatedAt":"2021-08-09T17:57:51.178Z","user":"5fd903caaecebd0018491bd5","category":"605e135b517d83006763f4ed","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":null,"children":[],"childrenPages":[]},{"_id":"61b7723e5d586f002d051402","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Runtime Insights","updates":[],"type":"basic","slug":"runtime-insights","excerpt":"Get meaningful information from your application's runtime directly in your Pull Request workflow","body":"[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Runtime Insights is only available in Early Access\",\n \"body\": \"Runtime Insights is currently in an early access period. If you are interested in trying Runtime Insights in your projects, [please apply to our Early Access Program](https://docs.google.com/forms/d/e/1FAIpQLSdlPDvesgVGKXzQ_TfuugLdhfZ3CDlYPGRiB88HHwgL_VvAcQ/viewform).\"\n}\n[/block]\nRuntime Insights uses information obtained during your application's runtime to provide contextual information to Pull Requests. Runtime Insights currently supports Codecov's **Critical Changes** features, which includes:\n\n* Labelling Pull Requests as Critical, such that important PRs in a list of currently open pull requests is emphasized. \n* Labelling changed files as Critical in the Codecov PR Comment, such that important changes are the file level are obvious to the PR author and reviewer(s).\n* Adding an Impacted Entrypoints table to the Codecov PR Comment, such that changes in a pull request are mapped directly to the most user facing aspect of the application\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/1533a54-runtime_insights.png\",\n \"runtime insights.png\",\n 1502,\n 865,\n \"#f8f8fa\"\n ],\n \"caption\": \"A stylized PR comment showing Runtime Insights in action. Impacted files that contain changes to highly executed code are labelled \\\"Critical\\\". Impacted Endpoints are also listed.\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"What is a Critical Change?\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Critical Changes are Currently in Early Access\",\n \"body\": \"The below definition of Critical Change will be used during Runtime Insight's early access period. It is expected that this definition will change, and may even be user configurable, on future releases.\"\n}\n[/block]\nA Critical Change is any code change in a Pull Request that impacts code that is frequently executed in a production/runtime context. More specifically, if a line of code executed more than <> the average of all executed lines is edited, it is considered a Critical Change.\n[block:api-header]\n{\n \"title\": \"What Languages are Supported?\"\n}\n[/block]\nCurrently, not even language is able to benefit from Runtime Insights. The current languages and/or frameworks are supported:\n\n* PHP (7.4 or higher) applications using the Laravel Framework. \n* Python 3 or higher\n\nThe following languages will be supported soon:\n\n* Ruby (v3.1 or higher)\n* NodeJS\n\nCodecov is using the Runtime Insights Early Access period to determine which languages and frameworks to support next. If you are interested in Runtime Insights, but do not use one of the above languages or frameworks, we [encourage you to apply](https://docs.google.com/forms/d/e/1FAIpQLSdlPDvesgVGKXzQ_TfuugLdhfZ3CDlYPGRiB88HHwgL_VvAcQ/viewform) to help us determine what languages to prioritize next. \n[block:api-header]\n{\n \"title\": \"How Do I use Runtime Insights?\"\n}\n[/block]\nIn order to function, Runtime Insights requires the following:\n\n* A profiling token used to identify your repository and authenticate API requests. During the Early Access period this token is provided to you directly by Codecov staff. \n* A repository using one of our supported languages that is currently running in a production context. \n* Varying dependencies that are determined by the language and/or framework being used.\n\nSpecific installation instructions will be provided for your language of choice upon acceptance into the Early Access program. \n[block:api-header]\n{\n \"title\": \"codecov.yml Configuration\"\n}\n[/block]\nTo see Impacted Entrypoints in your pull request comments, \"betaprofiling\" must be added to the `comment.layout` section of your codecov.yml, as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment: \\n layout: \\\"reach,diff,flags,tree,betaprofiling\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nIf you wish to add \"Critical\" markers to impacted files, you must update your codecov.yml as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment: \\n show_critical_paths: true\\n\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThese settings are also supported at the Team YAML level. \n[block:api-header]\n{}\n[/block]","order":13,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-12-12T18:36:02.937Z","createdAt":"2021-12-13T16:18:06.794Z","updatedAt":"2021-12-15T18:30:58.891Z","user":"5b95e8b206ca8a00031f1401","category":"605e135b517d83006763f4ed","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":null,"children":[],"childrenPages":[]}]},{"_id":"605e1084bc81560031aae596","title":"Reference","slug":"reference","order":3,"reference":false,"isAPI":false,"project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","createdAt":"2021-03-26T16:49:08.873Z","__v":0,"pages":[{"_id":"604a3fa3d6d5f0008027253f","api":{"params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"excerpt":"One of Codecov’s strengths is its capability to be virtually language agnostic. Since Codecov works by ingesting your coverage reports from the testing tools, the key component needed for the integration is the ability to upload a [coverage report](https://docs.codecov.com/docs/codecov-uploader) (ideally from your CI provider) to Codecov.\n\nOnce the uploading of the report(s) is complete, Codecov will process the report (5 - 30 seconds) depending on the report size and post a Pull (Merge) Request Comment. \n\nTo upload the reports, we’ve provided a simple codecov uploader, which should be used in your CI pipeline. Additionally you should [verify the integrity of the uploader](https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader), whenever it is downloaded from the external source. \n\nTo review necessary steps for integration, please review our [Getting Started Guide](https://docs.codecov.com/docs/quick-start).\n\nThe repositories listed below provide additional information about language-specific support, but for most use-cases it is strongly recommended to use the new uploader, rather than a language specific one.","updates":["58adb44975df0f1b001ed595","58adb4494b3e0b0f00e1bbcc","58adb58c75df0f1b001ed599","58adb8db900b60190010f66b","5ae3709836ee700003a657fa","5bd81b96ea08ad00edea8450","5be330d5981aae0275404396","5bf04e173329260013a42428","5f43f66af9544601bd234f2b","61e14d3ecde9020415cb3499","61ec4add2e26f40040b0fa46"],"sync_unique":"","version":"604a3fa3d6d5f0008027258e","category":"605e1084bc81560031aae596","hidden":false,"next":{"pages":[],"description":""},"project":"57b33b5ec9a4551700b969a5","slug":"supported-languages","parentDoc":null,"type":"basic","user":"5a5f7365678e1d0012d7cbd8","__v":11,"body":"[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"The repos below should be used for reference only. Since May of 2021, we recommend using the new uploader for all Codecov integrations.\",\n \"title\": \"Bash Uploader and Language-specific uploaders are deprecated\"\n}\n[/block]\n###Below is a list of supported languages, linking to their example repositories:\n\n- [Bash](https://github.com/codecov/example-bash)\n- [C](https://github.com/codecov/example-c)\n- C#\n - [Using OpenCover](https://github.com/codecov/example-csharp)\n- C++\n - [C++ 11](https://github.com/codecov/example-cpp11)\n - [C++ 11 Boost](https://github.com/codecov/example-cpp11_boost) \n - [C++ 11 w/ cmake](https://github.com/codecov/example-cpp11-cmake)\n - [C++ 98](https://github.com/codecov/example-cpp98)\n- [Clojure](https://github.com/codecov/example-clojure)\n- [D](https://github.com/codecov/example-d)\n- [Dart](https://github.com/codecov/dart)\n- [Elixir](https://github.com/codecov/example-elixir)\n- [Erlang](https://github.com/codecov/example-erlang)\n- [Fortran](https://github.com/codecov/example-fortran)\n- F# - Awaiting example repository\n- [Go](https://github.com/codecov/example-go)\n- [Haskell](https://github.com/codecov/example-haskell)\n- Java\n - [Using JaCoCo](https://github.com/codecov/example-java)\n - [Using Maven](https://github.com/codecov/example-java-maven)\n - [Android](https://github.com/codecov/example-android)\n - [Gradle](https://github.com/codecov/example-gradle)\n - [Groovy](https://github.com/codecov/example-groovy)\n - [Kotlin](https://github.com/codecov/example-kotlin)\n - [Scala w/ Scoverage](https://github.com/codecov/example-scala)\n - [Scala w/ Maven](https://github.com/codecov/example-scala-maven)\n - [Xtend](https://github.com/codecov/example-xtend)\n- [Julia](https://github.com/codecov/example-julia)\n- [Lua](https://github.com/codecov/example-lua)\n- [MATLAB](https://github.com/codecov/matlab-codecov-example)\n- Node / Javascript\n - [Node](https://github.com/codecov/example-node)\n - [TypeScript](https://github.com/codecov/example-typescript)\n - [TypeScript VSCode Extension](https://github.com/codecov/example-typescript-vscode-extension)\n- [Perl](https://github.com/codecov/example-perl)\n- [PHP](https://github.com/codecov/example-php)\n- [Python](https://github.com/codecov/example-python)\n- [R](https://github.com/codecov/example-r)\n- [Ruby](https://github.com/codecov/example-ruby)\n- [Rust](https://github.com/codecov/example-rust)\n- Salesforce\n - APEX\n - LWS\n- Scala\n - [Scala w/ Scoverage](https://github.com/codecov/example-scala)\n - [Scala w/ Maven](https://github.com/codecov/example-scala-maven)\n- [Typescript](https://github.com/codecov/example-typescript)\n - [VSCode extension](https://github.com/codecov/example-typescript-vscode-extension)\n- [Vala](https://github.com/codecov/example-vala)\n- Xcode\n - [Obj-C](https://github.com/codecov/example-objc)\n - [Swift](https://github.com/codecov/example-swift)\n\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Don't see your language?\"\n}\n[/block]\n Please [contact us](https://codecov.io/support).\n\nAll we need is:\n\n1. An example of how to produce the coverage.\n2. An example coverage output file to parse.","githubsync":"","isReference":false,"order":0,"createdAt":"2016-08-17T11:19:10.525Z","link_external":false,"link_url":"","title":"Codecov uploader and supported languages","updatedAt":"2022-01-14T16:26:04.780Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-08-24T03:45:46.328Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272551","api":{"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"method":"get"},"excerpt":"","link_url":"","next":{"pages":[],"description":""},"version":"604a3fa3d6d5f0008027258e","body":"[block:api-header]\n{\n \"title\": \"Supported CI Providers List\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"Every CI provider is supported by Codecov\",\n \"body\": \"In this page you can find specific documentation for a provider. If your CI provider is not found below, it is still supported. It just means that no unique documentation has been written yet. [Read more about detecting other CI providers](https://docs.codecov.io/docs/detecting-ci-services).\"\n}\n[/block]\n[AppVeyor](https://www.appveyor.com/)\n[Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) with Git repos\n[Bamboo](https://www.atlassian.com/software/bamboo)\n[Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines)\n[Bitrise](https://www.bitrise.io/integrations/steps/codecov)\n[Buildbot](http://buildbot.net/)\n[Buildkite](https://buildkite.com/)\n[CircleCI](https://circleci.com)\n[Codeship](https://codeship.com)\n[Codefresh](https://codefresh.io)\n[Drone](https://drone.io)\n[Github Actions](https://github.com/features/actions)\n[GitLab CI](https://about.gitlab.com/gitlab-ci/)\n[Greenhouse](https://greenhouseci.com/)\n[Jenkins](https://jenkins.io/)\n[Semaphore](https://semaphoreci.com/)\n[Shippable](https://app.shippable.com/)\n[TeamCity CI](https://www.jetbrains.com/teamcity/)\n[Travis CI](https://travis-ci.org/)\n[Wercker](http://wercker.com/)","createdAt":"2016-10-29T15:34:42.566Z","githubsync":"","link_external":false,"parentDoc":null,"sync_unique":"","title":"Supported CI Providers","user":"5b47e58599e0430003d8e823","type":"basic","__v":6,"category":"605e1084bc81560031aae596","hidden":false,"isReference":false,"order":1,"project":"57b33b5ec9a4551700b969a5","slug":"supported-ci-providers","updates":["5814c967f756b80f00e9df4f","58adb75e02f93c19004cb34b","5d13e0ac38d545002c8b621d","5d2ded7846c061003c4dc59f","5ef5f369e0d03b006678de5e","5f7cf03070aabc039e3377f8","61ae93584227950022bec028"],"updatedAt":"2021-07-09T16:32:31.333Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-06T21:18:50.445Z","deprecated":false,"children":[{"_id":"604a3fa3d6d5f0008027255b","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"excerpt":"","link_external":false,"link_url":"","title":"Detecting Other CI Services","category":"605e1084bc81560031aae596","githubsync":"","isReference":false,"next":{"pages":[],"description":""},"updates":["58ae119dbd00b90f00a88afc","5ee0f5171e4f590011079000","5ef61d8f0f42220043e8f168","6009e4683d0de8007c355e87","6026061c2b381900f1cac3f7","6279b03de14a4e0013b8121a"],"createdAt":"2016-08-17T14:06:01.772Z","order":0,"sync_unique":"","type":"basic","user":"5d2df7be2fc9ec00552ec020","__v":6,"body":"Codecov automatically detects a wide variety of [Supported CI providers](https://docs.codecov.io/docs/supported-ci-providers). There are some exceptions, or new providers, that Codecov does not detect. In the event that your CI provider does not meet our matching criteria, you would need to provide the domain where your provider is located at.\n\nThis approach is particularly relevant if your CI meets any of the following critieria:\n\n* It is hosted on-premises (e.g., `https://circleci.mycompany.com`).\n* It is relatively new.\n* It is a bespoke / custom CI that is not one of our mainstream supported CI providers.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Detecting an Unsupported CI Provider\"\n}\n[/block]\n\nCodecov detects CI services through the Commit Status API provided by GitHub/Bitbucket/GitLab. We review the target url, and context, in order to determine if the status is a \"continuous integration service\" that uploads coverage reports.\n\nTo manually add an unsupported CI, add the following to your codecov.yml:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n ci:\\n - jenkins.domain.com # add my custom jenkins server\\n - somenewci.com # add a new CI Codecov does not support yet.\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nIn addition to detecting CI's manually specified in the codecov.yaml, there is a match when `ci`, `semaphoreci`, `continuous-integration`, or `buildkite` is found in the **environmental variables context**.\n[block:api-header]\n{\n \"title\": \"Ignoring a Specific CI provider\"\n}\n[/block]\nYou can also ignore detecting the status of a specific CI provider. Below, we are ignoring [AppVeyor](https://www.appveyor.com/). This is useful when, for example, you have not properly configured AppVeyor, or you are not expecting coverage reports uploaded from a CI provider.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n ci:\\n - jenkins.domain.com # add my custom jenkins server\\n - !appveyor # ignore any statuses from appveyor\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]","hidden":false,"parentDoc":"604a3fa3d6d5f00080272551","project":"57b33b5ec9a4551700b969a5","slug":"detecting-ci-services","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-04-19T17:08:13.119Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-01-20T23:11:37.506Z","deprecated":false}],"childrenPages":[{"_id":"604a3fa3d6d5f0008027255b","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"excerpt":"","link_external":false,"link_url":"","title":"Detecting Other CI Services","category":"605e1084bc81560031aae596","githubsync":"","isReference":false,"next":{"pages":[],"description":""},"updates":["58ae119dbd00b90f00a88afc","5ee0f5171e4f590011079000","5ef61d8f0f42220043e8f168","6009e4683d0de8007c355e87","6026061c2b381900f1cac3f7","6279b03de14a4e0013b8121a"],"createdAt":"2016-08-17T14:06:01.772Z","order":0,"sync_unique":"","type":"basic","user":"5d2df7be2fc9ec00552ec020","__v":6,"body":"Codecov automatically detects a wide variety of [Supported CI providers](https://docs.codecov.io/docs/supported-ci-providers). There are some exceptions, or new providers, that Codecov does not detect. In the event that your CI provider does not meet our matching criteria, you would need to provide the domain where your provider is located at.\n\nThis approach is particularly relevant if your CI meets any of the following critieria:\n\n* It is hosted on-premises (e.g., `https://circleci.mycompany.com`).\n* It is relatively new.\n* It is a bespoke / custom CI that is not one of our mainstream supported CI providers.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Detecting an Unsupported CI Provider\"\n}\n[/block]\n\nCodecov detects CI services through the Commit Status API provided by GitHub/Bitbucket/GitLab. We review the target url, and context, in order to determine if the status is a \"continuous integration service\" that uploads coverage reports.\n\nTo manually add an unsupported CI, add the following to your codecov.yml:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n ci:\\n - jenkins.domain.com # add my custom jenkins server\\n - somenewci.com # add a new CI Codecov does not support yet.\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nIn addition to detecting CI's manually specified in the codecov.yaml, there is a match when `ci`, `semaphoreci`, `continuous-integration`, or `buildkite` is found in the **environmental variables context**.\n[block:api-header]\n{\n \"title\": \"Ignoring a Specific CI provider\"\n}\n[/block]\nYou can also ignore detecting the status of a specific CI provider. Below, we are ignoring [AppVeyor](https://www.appveyor.com/). This is useful when, for example, you have not properly configured AppVeyor, or you are not expecting coverage reports uploaded from a CI provider.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n ci:\\n - jenkins.domain.com # add my custom jenkins server\\n - !appveyor # ignore any statuses from appveyor\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]","hidden":false,"parentDoc":"604a3fa3d6d5f00080272551","project":"57b33b5ec9a4551700b969a5","slug":"detecting-ci-services","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-04-19T17:08:13.119Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-01-20T23:11:37.506Z","deprecated":false}]},{"_id":"604a3fa3d6d5f00080272581","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-01-20T14:30:53.613Z","createdAt":"2019-09-06T18:47:49.937Z","project":"57b33b5ec9a4551700b969a5","user":"5d83d59f45ef6c00435d18c1","category":"605e1084bc81560031aae596","updates":["602be43df9fc3d00753025f9","61b9547bdfa7fa0010560bb0","61fa7b6269b304022ef0751f"],"next":{"pages":[],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":2,"body":"Codecov centrally ingests `.xml` `.json` and `.txt` type coverage report formats.\n\nIf your language / test suite does not generate one of these format coverage reports, you may need to add a conversion step to your build process.\n[block:api-header]\n{\n \"title\": \"Generally Supported Code Coverage Formats\"\n}\n[/block]\n**Supported** code coverage report format types include all test coverage reports we've seen in the wild so far, including:\n\n* Most of .xml format types (Cobertura XML, Jacoco XML, etc.)\n* Most of .json format types (Erlang JSON, Elm JSON, etc.)\n* Most of .txt format types (Lcov TXT, Gcov TXT, Golang Txt)\n\nSee the exhaustive list below\n[block:api-header]\n{\n \"title\": \"Non-Supported Code Coverage Formats\"\n}\n[/block]\n**Non-supported** code coverage report format types include:\n\n`.xccov` (Xcode)\n`.ec`\n`.exec`\n`.coverage` (Python)\n`.html`\n\n[block:api-header]\n{\n \"title\": \"Exhaustive acceptable report formats\"\n}\n[/block]\nCodecov processes reports server side and accepts report formats we have come across over the years. Below is a list of acceptable coverage report formats.\n\nxml_processors = [\n BullseyeProcessor() # [c++]\n CloverProcessor(), # [php] via clover\n CoberturaProcessor() # [python] via cobertura\n CSharpProcessor(),\n JacocoProcessor(), # [java] via jacoco\n JetBrainsXMLProcessor(), # [jetbrainsxml] [JetBrains DetailedXML](https://www.jetbrains.com/dotcover/)\n MonoProcessor(), # [c# mono]\n SCoverageProcessor() # [scala] via [scoverage](http://scoverage.org/)\n VbProcessor(), # [c++] [c#]\n VbTwoProcessor(), # [c++] [c#]\n]\n\ntxt_processors = [\n DLSTProcessor(), # [dlst]\n GapProcessor(),\n GcovProcessor(), # [gcov]\n GoProcessor(),\n LcovProcessor(), # [lcov] - Graphical version of Gcov\n LuaProcessor(), # [[lua](https://keplerproject.github.io/luacov/)]\n XCodeProcessor() # [xcode] - Native iOS development\n]\n\njson_processors = [\n CoverallsProcessor(),\n ElmProcessor(),\n FlowcoverProcessor(),\n GapProcessor(),\n NodeProcessor(),\n RlangProcessor(), # [r lang]\n RspecProcessor(), # [rspec]\n SalesforceProcessor(),\n ScalaProcessor(),\n VOneProcessor(),\n]","excerpt":"","slug":"supported-report-formats","type":"basic","title":"Supported Coverage Report Formats","__v":3,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-02-16T03:44:18.802Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027254b","excerpt":"Worthwhile to mention that the docker run command should also set the \"CI\" environment variable to \"true\". On the CI service, e.g. GitHub Actions, it is set, but if you don't explicitly set it in the docker run call it won't be set and then Codecov won't detect GitHub Actions, at least not in Ruby (see https://github.com/codecov/codecov-ruby/blob/484767f1c3d7992a9d7fedd6dc72d35a80d04f70/lib/codecov.rb#L68-L69)","link_url":"","order":4,"title":"Testing with Docker","updates":["58addb831e641e23005e06a9","5ffb712bdd46b00049d0243d"],"user":"5b47e58599e0430003d8e823","body":"Running tests inside a [Docker](https://docker.com) container is a popular technique, and with one small extra step Codecov will integrate seamlessly. Because of the containerization, reports generated in the container are not retrievable outside of it, but we have two techniques to help Codecov collect reports.\n\n### Codecov *Inside* Docker\n\nThe easiest and most popular technique is to pass environment variables through the container. \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# request codecov to detect CI environment to pass through to docker\\nci_env=`bash <(curl -s https://codecov.io/env)`\\ndocker run $ci_env -e CI=true ...\\n |----- inside docker container\\n | # exec tests\\n | # Your Codecov Uploader approach here\\n | # See more at https://docs.codecov.com/docs/codecov-uploader\\n | ./codecov\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n### Codecov *Outside* Docker\n\nPass coverage reports out of the container through a mounted directory, and then run Codecov. This requires you to know the report files and where to put them.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# create a shared folder to store reports in\\nmkdir shared\\n# include shared folder when running docker\\n# make sure you move your reports into the shared folder while in docker\\ndocker run -v \\\"$PWD/shared:/shared\\\" ...\\n |----- inside docker container\\n | # run test\\n | mv coverage.txt shared\\n# now run codecov in project directory to discover reports in shared folder\\n\\n# Your Codecov Uploader approach here\\n# See more at https://docs.codecov.com/docs/codecov-uploader\\n./codecov\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","hidden":false,"isReference":false,"project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":2,"category":"605e1084bc81560031aae596","githubsync":"","link_external":false,"parentDoc":null,"sync_unique":"","type":"basic","api":{"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"language":"json","status":400,"name":"","code":"{}"}]},"settings":"","url":"","apiSetting":null,"method":"get"},"createdAt":"2016-08-17T18:01:16.560Z","next":{"pages":[],"description":""},"slug":"testing-with-docker","updatedAt":"2021-07-02T16:57:14.188Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-01-10T21:25:17.121Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027254e","hidden":false,"link_url":"","next":{"pages":[],"description":""},"slug":"administration","category":"605e1084bc81560031aae596","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"language":"json","status":400,"name":"","code":"{}"}]},"settings":"","method":"get"},"isReference":false,"parentDoc":null,"body":"Codecov provides an internal tool to manage account administrators. These administrators may adjust billing and the [Team Yaml](doc:codecov-yaml#section-team-yaml).\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Service provider administrators automatically have full privileges in Codecov\",\n \"body\": \"You do not need to add users that already are administrators in GitHub/Bitbucket/GitLab\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/bcbc944-Screen_Shot_2016-08-25_at_3.48.23_PM.png\",\n \"Screen Shot 2016-08-25 at 3.48.23 PM.png\",\n 1534,\n 456,\n \"#cececf\"\n ]\n }\n ]\n}\n[/block]\nPlease type in the username and select the user from the dropdown to add new administrators. Remove by clicking revoke to the right of each user row.","excerpt":"","sync_unique":"","type":"basic","user":"57b33af9eeec08220094ea97","version":"604a3fa3d6d5f0008027258e","__v":3,"githubsync":"","link_external":false,"order":5,"project":"57b33b5ec9a4551700b969a5","title":"Administration","updates":["58adebbbe9b1420f0024934b","5bc2d6bb70043a001268bb17","5bf1550c5f64d3001d642426"],"createdAt":"2016-08-25T19:50:41.600Z","updatedAt":"2019-12-06T17:00:07.734Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272579","version":"604a3fa3d6d5f0008027258e","githubsync":"","hidden":false,"next":{"description":"","pages":[]},"project":"57b33b5ec9a4551700b969a5","slug":"error-reference","type":"basic","user":"5d2df7be2fc9ec00552ec020","body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Missing base report\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"body\": \"https://community.codecov.io/c/feature-request\",\n \"title\": \"Improving this feature. Please share feedback on our community forums.\"\n}\n[/block]\nIn order to produce an accurate coverage comparison, Codecov must have the coverage report for the pull request base.\n\n**Best Practice**: Always fork a branch from a successful CI commit that has coverage uploaded, as illustrated below.\n\nThis issue occurs when the base commit (the parent commit of the first commit on the pull request) did not upload coverage and/or failed CI tests.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# [legend] P=CI-Passed, F=CI-Failed, .=No-CI-Ran\\n\\n# Illustration A\\nmaster . F . .\\npull \\\\ . . P\\n# Base commit's CI failed therefore base report is invalid.\\n# Resulting in \\\"missing base report\\\"\\n\\n------------------------------------------------\\n\\n# Illustration B\\nmaster . . . .\\npull \\\\ . . P\\n# Base commit has no reports uploaded.\\n# Resulting in \\\"missing base report\\\"\\n\\n------------------------------------------------\\n\\n# Illustration C\\nmaster P\\npull \\\\ . . P\\n# Base and head commits passed CI and uploaded coverage to Codecov.\\n# Resulting in a beautiful comment being posted.\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\nNext: Read about [Comparing Commits](doc:comparing-commits).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Missing head commit\"\n}\n[/block]\nYou will see an error stating ` No coverage uploaded for pull request head.` when the pull request has:\n\n- not yet uploaded coverage results to Codecov;\n- or the uploaded reports are from failed CI builds.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Unknown Author\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/21acadb-Screen_Shot_2017-02-20_at_8.43.18_AM.png\",\n \"Screen Shot 2017-02-20 at 8.43.18 AM.png\",\n 624,\n 288,\n \"#c9c9c5\"\n ]\n }\n ]\n}\n[/block]\nIf your commit is showing author as **\"Unknown\"**, here is how to fix it.\n\nYour git provider (i.e. GitHub) is not returning the author id in the commit api result. This is because the email used to commit is not the same as your Github account.\n\nEdit the user email found in your `~/.gitconfig`:\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"[user]\\n\\tname = Your Name\\n\\temail = email@domain.com # make sure the email is the same you login to Github\",\n \"language\": \"yaml\",\n \"name\": \"~/.gitconfig\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"No statuses or pull requests are posting\"\n}\n[/block]\nThis issue is likely caused by the bot losing authentication to your project. Learn more [Team Bot](doc:team-bot).\n[block:api-header]\n{\n \"title\": \"Empty Reports\"\n}\n[/block]\nTo check if your uploaded report is empty (containing no coverage data) please download the reports by clicking *Download* in the build logs. Look for the file by searching the string `# path=`. Review each file to confirm if coverage was properly collected.\n[block:api-header]\n{\n \"title\": \"400 Errors when uploading coverage\"\n}\n[/block]\nIf you're using [codecov-python](https://github.com/codecov/codecov-python), [codecov-node](https://github.com/codecov/codecov-node), or [codecov-exe](https://github.com/codecov/codecov-exe) to upload coverage, please try our [universal binary uploader](doc:codecov-uploader).\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Additional FAQ\",\n \"body\": \"There are additional frequently asked questions [linked here](doc:frequently-asked-questions).\"\n}\n[/block]","isReference":false,"link_external":false,"updates":["58adef97e9b1420f00249361","5beed543acc5fe004a380b07","5ed5f9f053081f00434d5213","60d0ea048f57bc0074d303d2"],"__v":4,"createdAt":"2017-01-17T16:40:42.818Z","excerpt":"","order":6,"parentDoc":null,"api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","method":"get"},"category":"605e1084bc81560031aae596","link_url":"","sync_unique":"","title":"Error Reference","updatedAt":"2022-01-26T18:05:08.840Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-06-21T16:47:47.886Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272555","user":"5b47e58599e0430003d8e823","body":"Codecov uses a Yaml-style configuration methodology.\n\nThere are two primary locations for the Codecov Yaml: \n\n* **Team Yaml**: The global settings for your organization, accessible via your settings page in Codecov https://app.codecov.io/account/[gh/gl/bb]/[org_name]/yaml\n* **Repository Yaml**: The repo level settings for each repo, set and held in your Github/Gitlab/Bitbucket. \n\nIf both the Team YAML AND the Repository YAML are set, the Repository-level YAML has priority.\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Changing your YAML?\",\n \"body\": \"Changing your YAML? A reminder to always validate your YAML before you deploy [https://api.codecov.io/validate](https://api.codecov.io/validate)\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"See the full [codecov.yml Reference](doc:codecovyml-reference) page.\",\n \"title\": \"Looking for all possible YAML configurations?\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Default yaml\"\n}\n[/block]\nThe default configuration for all projects in Codecov is demonstrated below. You may override any of these configurations in your own Team/Repository Yaml.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n require_ci_to_pass: yes\\n\\ncoverage:\\n precision: 2\\n round: down\\n range: \\\"70...100\\\"\\n\\nparsers:\\n gcov:\\n branch_detection:\\n conditional: yes\\n loop: yes\\n method: no\\n macro: no\\n\\ncomment:\\n layout: \\\"reach,diff,flags,files,footer\\\"\\n behavior: default\\n require_changes: no\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Just starting out?\",\n \"body\": \"If no changes are made to the default YAML, Codecov will use the above.\\n\\nTherefore, it is **not** necessary to copy and paste the above to start your use of Codecov. In most cases, Codecov will work without the need for a codecov.yml file.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Team YAML\"\n}\n[/block]\nCodecov provides a user interface to adjust a \"team yaml\", which overrides the default settings in Codecov. It is applied to all repositories in the team. Only team administrators can adjust the team yaml in Codecov. All changes are stored in history.\n\nThe most common use for the team yaml is to set up a [Codecov Bot](https://docs.codecov.io/docs/team-bot) account and [adding custom CI services](https://docs.codecov.io/docs/detecting-ci-services).\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3d2ca3d-Screen_Shot_2016-08-17_at_8.48.48_AM.png\",\n \"Screen Shot 2016-08-17 at 8.48.48 AM.png\",\n 1998,\n 986,\n \"#252c25\"\n ],\n \"caption\": \"The team yaml (seen in the black box above) can be found in your account center `/account/gh/OWNER/yaml`.\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Repository yaml\"\n}\n[/block]\nEach repository may have their own unique Codecov Yaml. The contents of the Repository Yaml are stored in a file, checked into `git/hg`. \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/fbcca1b-Screen_Shot_2016-08-17_at_9.07.20_AM.png\",\n \"Screen Shot 2016-08-17 at 9.07.20 AM.png\",\n 1790,\n 138,\n \"#f2f2f2\"\n ],\n \"caption\": \"`codecov.yml` in the project root.\"\n }\n ]\n}\n[/block]\nAll configurations in the Repository Yaml will override the Team Yaml. The Team Yaml is **not** replaced, but updated with the Repository Yaml.\n\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Team Yaml\\ncoverage:\\n round: down\\n precision: 5\\n\\n# Repository Yaml\\ncoverage:\\n round: up\\n range: 0..10\\n\\n# Used in Codecov after updating\\ncoverage:\\n round: up\\n range: 0..10\\n precision: 5\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Looking to pass or fail a pull request / merge request based on coverage?\",\n \"body\": \"[Please see our \\\"Commit Status\\\" feature](https://docs.codecov.io/docs/commit-status) for passing or failing a pull request based on code coverage thresholds\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Validate your repository yaml\"\n}\n[/block]\nValidate your repository yaml by posting the content to Codecov for analysis.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl --data-binary @codecov.yml https://codecov.io/validate\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# PowerShell Sample\\nInvoke-RestMethod -Uri https://codecov.io/validate -Body (Get-Content -Raw -LiteralPath .\\\\codecov.yml) -Method post\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Validation response codes.\",\n \"body\": \"A quick way to determine if the YAML validated against this endpoint is to check the response code. An invalid YAML will return a status code of 400, instead of the normal 200 success.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Default Branch\"\n}\n[/block]\nCodecov will use the default branch from Git for your repository as the primary source of the repositories' Codecov.yml. \n\nYou can change the Codecov default branch in your YAML. \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n branch: stable # set new Default branch\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nThe default branch is used to identify:\n\n1. Which branch to cache the repository yaml for UI changes.\n2. Which branch is the first branch on the repository dashboard in Codecov.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Locking Codecov YAML to a Branch\"\n}\n[/block]\nCodecov will **always** use the current yaml on the branch being tested by default. If you would like to restrict changes to the yaml, and always use the yaml on a specific branch, you may declare the branch as shown below.\n\nFor example: you may be changing the Codecov YAML on a feature branch to test out Codecov features but want the Codecov configuration to always reference the default branch\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n strict_yaml_branch: default # only use the latest YAML on stated branch\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Expired Reports\"\n}\n[/block]\nCodecov will reject reports that are over 12 hours old according to the timestamp in the report. This is to prevent reports that may have been accidently checked into `git`.\n\nTo disable this functionality please add the following to your `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n max_report_age: off\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Frequently asked questions\"\n}\n[/block]\n## Can I name the file .codecov.yml?\n\nYes. However, the file must still be located in the repository root, `dev/`, or `.github/` directories\n\n## What is the purpose of the codecov.yml file?\n\nThe Codecov Yaml file is the single-point of configuration, providing the developers with a transparent and version controlled file to adjust all Codecov settings.\n\n## Do I need a codecov.yml file?\n\nNo. Review our [default yaml](#section-default-yaml), which all projects use. However, if you need to customize your project in Codecov, or add new notifications, then the yaml is required.\n\n## How do I encrypt data that I do not want public?\n\nHead over to your repository settings page; click the **Yaml** tab. You will find the **Create new secret string** section in the UI. Information on how to create and use these strings is found in the app.\n\n## Why does my bot not match the one I inputted on my yaml?\n\nThere are several reasons why the bot specified does not match the one in use:\n\n- **The YAML in your repo is invalid.** If you included the bot username in a repository-level YAML, please follow the steps [here](https://docs.codecov.io/docs/codecov-yaml#section-validate-your-repository-yaml) to determine if this repository-level YAML is valid.\n\n You might also want to consider setting a bot in the organization-level YAML so it's easier to see what’s going wrong.\n\n- **The bot is not part of the organization.** For a team bot to work, it must be part of the organization your repositories live in.\n\n- **The bot was not granted access to the repository you have.** To resolve, simply login to Codecov as the bot.\n\n- **The bot's access token has expired.** To resolve, log into Codecov again as the bot and grant permission.\n\n## Why does the current repository yaml not match what I have in my repo?\n\nThere are three possible reasons why the YAML you see in the _Current repository yaml_ section of the `/settings/yaml` page does not match the one you see in your repo:\n\n- **The YAML in your repo is invalid.** When the repoistory-level YAML is invalid, we keep using the last valid YAML provided. To determine whether your YAML is valid, please follow the steps [here](https://docs.codecov.io/docs/codecov-yaml#section-validate-your-repository-yaml).\n\n- **The repository-level YAML is not in what Codecov considers the _default branch_.** If the YAML is in a feature branch, you should be able to see it in _Current repository yaml_ section of the `/settings/yaml` page after merging the feature branch into the default branch. You can identify the default branch in the _Default Branch_ section of the `/settings` page.\n\n- **Codecov was unable to fetch the new YAML from the repo.** This usually happens when the bot user you use ([more info](https://docs.codecov.io/docs/team-bot)) or the provider integration you installed does not have access to the repository in your provider (i.e. GitHub, GitLab, etc). It's also possible you unintentionally specified the wrong bot user.","githubsync":"","hidden":false,"parentDoc":null,"title":"About the Codecov yaml","__v":8,"category":"605e1084bc81560031aae596","excerpt":"","link_url":"","next":{"pages":[],"description":""},"order":8,"updates":["58aa3102a790600f000e8991","58ae07c85b6a7c19009b82f8","5c2fb7f1385758001f1697a1","5cca917286ca240057d6846f","5eb1c4450e62bd002b03dda0","5ec84bad40431e0239e92a7c","5f8ebec98e3445004c6f829f","60ee6ab762d74f0072f0ca35"],"version":"604a3fa3d6d5f0008027258e","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"status":400,"name":"","code":"{}","language":"json"}]},"method":"get"},"createdAt":"2016-08-17T11:26:11.494Z","isReference":false,"link_external":false,"project":"57b33b5ec9a4551700b969a5","slug":"codecov-yaml","sync_unique":"","type":"basic","updatedAt":"2022-01-19T16:03:54.352Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-08T19:00:04.434Z","deprecated":false,"children":[{"_id":"604a3fa3d6d5f00080272583","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-05-25T20:33:22.858Z","createdAt":"2019-11-06T13:51:06.107Z","project":"57b33b5ec9a4551700b969a5","user":"620a88fb4945600073cd5bce","category":"605e1084bc81560031aae596","updates":["5e2994788bb8130012560f85","5ed0a6d293850f003d733cc2","5ed0ab5460df6d006c2c9d0a","5f18c85b2ff88e00700a0351","603e5375171a96002ee280a1","605fe3a926393c0047f3c1a5","61056957003810002d42fdff"],"next":{"pages":[],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":0,"body":"[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"Changing your YAML? A reminder to always validate your YAML before you deploy https://api.codecov.io/validate\",\n \"title\": \"Changing your YAML?\"\n}\n[/block]\n# Top-level sections used in codecov.yml\n\n## codecov\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n token: \\\"\\\"\\n bot: \\\"codecov-io\\\"\\n ci:\\n - \\\"travis.org\\\"\\n strict_yaml_branch: \\\"yaml-config\\\"\\n max_report_age: 24\\n disable_default_path_fixes: no\\n require_ci_to_pass: yes\\n notify:\\n after_n_builds: 2\\n wait_for_ci: yes\\n \\n\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### codecov.token\n\nThe repository upload token\n\n * Type: String\n * Default: N/A\n\n------------------------\n\n### codecov.bot\n\nThe username you want to use for Codecov operations\n\n * Type: String\n * Default: N/A\n * More Info: https://docs.codecov.io/docs/team-bot\n\n------------------------------------\n\n### codecov.ci\n\nAdditional CI provider URLs you want Codecov to recognize.\n\n * Type: Map\n * Default: N/A\n * More Info: https://docs.codecov.io/docs/detecting-ci-services\n\n--------------------------------------\n\n### codecov.strict_yaml_branch\n\nSpecify a branch you want Codecov to always only read the YAML from\n\n * Type: String\n * Default: N/A\n * More Info: https://docs.codecov.io/docs/codecov-yaml#section-restricting-changes\n\n-----------------------------\n\n### codecov.max_report_age\n\nThe age you want coverage reports to expire at, or if you want to disable this check. Expired reports will not be processed by codecov.\n\n * Type: Int, String, Boolean\n * Default: 12h\n * More Info: https://docs.codecov.io/docs/codecov-yaml#section-expired-reports\n\n-----------------------------\n\n### codecov.disable_default_path_fixes\n\nShould Codecov's default path fixes be disabled\n\n * Type: Boolean\n * Default: no\n * More Info: https://docs.codecov.io/docs/fixing-paths\n\n-----------------------------\n\n### codecov.require_ci_to_pass\n\nShould Codecov wait for all other statuses to pass before sending its status.\n\n * Type: Boolean\n * Default: yes\n\n-----------------------------\n\n### codecov.notify\n\n#### codecov.notify.after_n_builds\n\nHow many uploaded reports Codecov should wait to receive before sending statuses\n\n * Type: Int\n * Default: 1\n * More Info: https://docs.codecov.io/docs/notifications#section-preventing-notifications-until-after-n-builds\n\n-----------------------------\n\n#### codecov.notify.wait_for_ci\n\nShould Codecov wait for all CI statuses to complete before sending ours.\nNote: Codecov considers all non-codecov statuses to be CI statuses\n\n * Type: Boolean\n * Default: yes\n\n-----------------------------\n\n## coverage\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n precision: 2\\n round: down\\n range: \\\"70...100\\\"\\n notify:\\n # notification blocks. See: https://docs.codecov.io/docs/codecovyml-reference#section-coverage-notify\\n status:\\n project:\\n patch:\\n changes:\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n-----------------------------\n\n### coverage.precision\n\nWhat precision do you want the coverage value to be\n\n * Type: Range(0,5)\n * Default: 2\n\n-----------------------------\n\n### coverage.round\n\nWhich direction to you want to round the coverage value\n\n * Type: One of 'down', 'up', 'nearest'\n * Default: down\n\n-----------------------------\n\n### coverage.range\n\nThe value range where you want the value to be green\n\n * Type: start...end\n * Default: 70..100\n * More Info: https://docs.codecov.io/docs/coverage-configuration#section-range\n\n-----------------------------\n\n### coverage.notify\n\nThe standard notification settings are shown below, but it is recommend to view https://docs.codecov.io/docs/notifications for more information. \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \": #see: ttps://docs.codecov.io/docs/notifications\\n url: \\\"https://hooks.example.com/hook/8675309\\\"\\n branches': \\n - master\\n - dev\\n - staging\\n threshold': 1%\\n flags: \\n - backend\\n - frontend\\n base: \\\"parent\\\"\\n only_pulls: false\\n paths: \\\"*/**/*\\\"\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nNote that the following notification providers are supported and will need to be defined in the YAML (see [Notifications](https://docs.codecov.io/docs/notifications)):\n\n* Gitter\n* Hipchat\n* IRC\n* Slack\n\n\n-----------------------------\n\n### coverage.status\n\nSee: https://docs.codecov.io/docs/commit-status for more information\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default: # This can be anything, but it needs to exist as the name\\n # basic settings\\n target: auto\\n threshold: 5%\\n base: auto \\n # advanced settings\\n branches: \\n - master\\n if_ci_failed: error #success, failure, error, ignore\\n only_pulls: false\\n flags: \\n - frontend\\n paths: \\n - src/frontend\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n------------------------------------------\n\n## parsers\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"parsers:\\n javascript:\\n enable_partials: yes\\n v1:\\n include_full_missed_files: true # default false\\n gcov:\\n branch_detection:\\n conditional: yes\\n loop: yes\\n method: no\\n macro: no\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n#### parsers.javascript\n\nUnknown\n\n * Type: map\n * More Info: https://docs.codecov.io/docs/node\n\n------------------------------------------\n\n#### parsers.v1\n\nUnknown\n\n * Type: map\n * More Info: https://docs.codecov.io/docs/ruby\n\n------------------------------------------\n\n#### parsers.gcov\n\nControls how Codecov parses branch coverage in gcov reports. The coverage must exist in the uploaded report for us to parse it.\n\n * Type: map\n * More Info: https://docs.codecov.io/docs/codecov-yaml#section-default-yaml\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"parsers:\\n gcov:\\n branch_detection:\\n conditional: yes\\n loop: yes\\n method: no\\n macro: no\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n#### parsers.go\n\nControls how Codecov parses partial coverage in Golang reports. The coverage must exist in the uploaded report for us to parse it.\n\n* Type: map\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"parsers:\\n go:\\n partials_as_hits: true #false by default\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## ignore\n\n* More info: https://docs.codecov.io/docs/ignoring-paths\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"ignore:\\n - \\\"path/to/folder\\\" # ignore folders and all its contents\\n - \\\"test_*.rb\\\" # wildcards accepted\\n - \\\"**/*.py\\\" # glob accepted\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## fixes\n\n* More info: https://docs.codecov.io/docs/fixing-paths\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"fixes:\\n - \\\"before/::after/\\\" # move path e.g., \\\"before/path\\\" => \\\"after/path\\\"\\n - \\\"::after/\\\" # move root e.g., \\\"path/\\\" => \\\"after/path/\\\"\\n - \\\"before/::\\\" # reduce root e.g., \\\"before/path/\\\" => \\\"path/\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## flags\n\n* More info: https://docs.codecov.io/docs/flags\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"flags:\\n projectA: \\n paths:\\n - projectA/src\\n carryforward: false #default -- false\\n projectB:\\n paths:\\n - projectB/src\\n carryforward: true\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## comment\n\n* More info: https://docs.codecov.io/docs/pull-request-comments\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment:\\n layout: \\\"reach, diff, flags, files\\\"\\n behavior: default\\n require_changes: false # if true: only post the comment if coverage changes\\n require_base: no # [yes :: must have a base report to post]\\n require_head: yes # [yes :: must have a head report to post]\\n branches: # branch names that can post comment\\n - staging\\n - master\\n after_n_builds: #e.g., 5. The number of uploaded reports codecov \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## github_checks (GitHub users only)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_checks:\\n annotations: false\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### annotations\n\nSpecify whether to use GitHub Checks annotations or normal statuses. GitHub Checks are enabled by default on the [patch status](doc:commit-status#patch-status)\n\n * Type: Boolean\n * Default: true\n * More Info: [GitHub Checks](doc:github-checks-beta)","excerpt":"","slug":"codecovyml-reference","type":"basic","metadata":{"description":"","title":"","image":[]},"title":"codecov.yml Reference","__v":7,"parentDoc":"604a3fa3d6d5f00080272555","pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-07-22T19:17:20.699Z","deprecated":false},{"_id":"604a3fa3d6d5f00080272559","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{}"},{"status":400,"name":"","code":"{}","language":"json"}]},"settings":""},"category":"605e1084bc81560031aae596","sync_unique":"","body":"The default configuration for all repositories on Codecov is shown below. You can customize these values to fit your project's usage case.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n range: 70..100\\n round: down\\n precision: 2\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Range\n\nThis value is used to customize the visible color range in Codecov. The first number represents the red, and the second represents green. You can change the range of colors by adjusting this configuration.\n\nFor example, `50...75` would result in any coverage less than 50% having a red background. The color would gradually change to green when approaching the 75% mark. Any coverage over 75% would result in a solid green color.\n[block:html]\n{\n \"html\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n}\n[/block]\n## Rounding\n\nCodecov will round coverage down to the precision point by default.\n\n```\n45.15313% would become 45.15%.\n62.918777% would become 62.91%.\n```\n\nYou may choose to round `up`, `down`, or `nearest`.\n\n\n## Precision\n\nYou may choose to show more precision when viewing coverage reports on Codecov. Please select a number between `0` and `5` as the number of decimal places visible in the UI and all notifications.","createdAt":"2016-08-17T14:08:10.712Z","excerpt":"Help with colors, rounding and precision","hidden":false,"isReference":false,"link_url":"","project":"57b33b5ec9a4551700b969a5","order":1,"parentDoc":"604a3fa3d6d5f00080272555","slug":"coverage-configuration","version":"604a3fa3d6d5f0008027258e","__v":1,"githubsync":"","link_external":false,"next":{"pages":[],"description":""},"title":"Coverage Configuration","type":"basic","updates":["58ae0b778e84100f00c7b778"],"user":"57b33af9eeec08220094ea97","updatedAt":"2019-12-06T17:00:07.747Z","metadata":{"title":"","description":"","image":[]}}],"childrenPages":[{"_id":"604a3fa3d6d5f00080272583","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-05-25T20:33:22.858Z","createdAt":"2019-11-06T13:51:06.107Z","project":"57b33b5ec9a4551700b969a5","user":"620a88fb4945600073cd5bce","category":"605e1084bc81560031aae596","updates":["5e2994788bb8130012560f85","5ed0a6d293850f003d733cc2","5ed0ab5460df6d006c2c9d0a","5f18c85b2ff88e00700a0351","603e5375171a96002ee280a1","605fe3a926393c0047f3c1a5","61056957003810002d42fdff"],"next":{"pages":[],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":0,"body":"[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"Changing your YAML? A reminder to always validate your YAML before you deploy https://api.codecov.io/validate\",\n \"title\": \"Changing your YAML?\"\n}\n[/block]\n# Top-level sections used in codecov.yml\n\n## codecov\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"codecov:\\n token: \\\"\\\"\\n bot: \\\"codecov-io\\\"\\n ci:\\n - \\\"travis.org\\\"\\n strict_yaml_branch: \\\"yaml-config\\\"\\n max_report_age: 24\\n disable_default_path_fixes: no\\n require_ci_to_pass: yes\\n notify:\\n after_n_builds: 2\\n wait_for_ci: yes\\n \\n\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### codecov.token\n\nThe repository upload token\n\n * Type: String\n * Default: N/A\n\n------------------------\n\n### codecov.bot\n\nThe username you want to use for Codecov operations\n\n * Type: String\n * Default: N/A\n * More Info: https://docs.codecov.io/docs/team-bot\n\n------------------------------------\n\n### codecov.ci\n\nAdditional CI provider URLs you want Codecov to recognize.\n\n * Type: Map\n * Default: N/A\n * More Info: https://docs.codecov.io/docs/detecting-ci-services\n\n--------------------------------------\n\n### codecov.strict_yaml_branch\n\nSpecify a branch you want Codecov to always only read the YAML from\n\n * Type: String\n * Default: N/A\n * More Info: https://docs.codecov.io/docs/codecov-yaml#section-restricting-changes\n\n-----------------------------\n\n### codecov.max_report_age\n\nThe age you want coverage reports to expire at, or if you want to disable this check. Expired reports will not be processed by codecov.\n\n * Type: Int, String, Boolean\n * Default: 12h\n * More Info: https://docs.codecov.io/docs/codecov-yaml#section-expired-reports\n\n-----------------------------\n\n### codecov.disable_default_path_fixes\n\nShould Codecov's default path fixes be disabled\n\n * Type: Boolean\n * Default: no\n * More Info: https://docs.codecov.io/docs/fixing-paths\n\n-----------------------------\n\n### codecov.require_ci_to_pass\n\nShould Codecov wait for all other statuses to pass before sending its status.\n\n * Type: Boolean\n * Default: yes\n\n-----------------------------\n\n### codecov.notify\n\n#### codecov.notify.after_n_builds\n\nHow many uploaded reports Codecov should wait to receive before sending statuses\n\n * Type: Int\n * Default: 1\n * More Info: https://docs.codecov.io/docs/notifications#section-preventing-notifications-until-after-n-builds\n\n-----------------------------\n\n#### codecov.notify.wait_for_ci\n\nShould Codecov wait for all CI statuses to complete before sending ours.\nNote: Codecov considers all non-codecov statuses to be CI statuses\n\n * Type: Boolean\n * Default: yes\n\n-----------------------------\n\n## coverage\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n precision: 2\\n round: down\\n range: \\\"70...100\\\"\\n notify:\\n # notification blocks. See: https://docs.codecov.io/docs/codecovyml-reference#section-coverage-notify\\n status:\\n project:\\n patch:\\n changes:\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n-----------------------------\n\n### coverage.precision\n\nWhat precision do you want the coverage value to be\n\n * Type: Range(0,5)\n * Default: 2\n\n-----------------------------\n\n### coverage.round\n\nWhich direction to you want to round the coverage value\n\n * Type: One of 'down', 'up', 'nearest'\n * Default: down\n\n-----------------------------\n\n### coverage.range\n\nThe value range where you want the value to be green\n\n * Type: start...end\n * Default: 70..100\n * More Info: https://docs.codecov.io/docs/coverage-configuration#section-range\n\n-----------------------------\n\n### coverage.notify\n\nThe standard notification settings are shown below, but it is recommend to view https://docs.codecov.io/docs/notifications for more information. \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \": #see: ttps://docs.codecov.io/docs/notifications\\n url: \\\"https://hooks.example.com/hook/8675309\\\"\\n branches': \\n - master\\n - dev\\n - staging\\n threshold': 1%\\n flags: \\n - backend\\n - frontend\\n base: \\\"parent\\\"\\n only_pulls: false\\n paths: \\\"*/**/*\\\"\\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nNote that the following notification providers are supported and will need to be defined in the YAML (see [Notifications](https://docs.codecov.io/docs/notifications)):\n\n* Gitter\n* Hipchat\n* IRC\n* Slack\n\n\n-----------------------------\n\n### coverage.status\n\nSee: https://docs.codecov.io/docs/commit-status for more information\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n status:\\n project:\\n default: # This can be anything, but it needs to exist as the name\\n # basic settings\\n target: auto\\n threshold: 5%\\n base: auto \\n # advanced settings\\n branches: \\n - master\\n if_ci_failed: error #success, failure, error, ignore\\n only_pulls: false\\n flags: \\n - frontend\\n paths: \\n - src/frontend\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n------------------------------------------\n\n## parsers\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"parsers:\\n javascript:\\n enable_partials: yes\\n v1:\\n include_full_missed_files: true # default false\\n gcov:\\n branch_detection:\\n conditional: yes\\n loop: yes\\n method: no\\n macro: no\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n#### parsers.javascript\n\nUnknown\n\n * Type: map\n * More Info: https://docs.codecov.io/docs/node\n\n------------------------------------------\n\n#### parsers.v1\n\nUnknown\n\n * Type: map\n * More Info: https://docs.codecov.io/docs/ruby\n\n------------------------------------------\n\n#### parsers.gcov\n\nControls how Codecov parses branch coverage in gcov reports. The coverage must exist in the uploaded report for us to parse it.\n\n * Type: map\n * More Info: https://docs.codecov.io/docs/codecov-yaml#section-default-yaml\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"parsers:\\n gcov:\\n branch_detection:\\n conditional: yes\\n loop: yes\\n method: no\\n macro: no\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n#### parsers.go\n\nControls how Codecov parses partial coverage in Golang reports. The coverage must exist in the uploaded report for us to parse it.\n\n* Type: map\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"parsers:\\n go:\\n partials_as_hits: true #false by default\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## ignore\n\n* More info: https://docs.codecov.io/docs/ignoring-paths\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"ignore:\\n - \\\"path/to/folder\\\" # ignore folders and all its contents\\n - \\\"test_*.rb\\\" # wildcards accepted\\n - \\\"**/*.py\\\" # glob accepted\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## fixes\n\n* More info: https://docs.codecov.io/docs/fixing-paths\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"fixes:\\n - \\\"before/::after/\\\" # move path e.g., \\\"before/path\\\" => \\\"after/path\\\"\\n - \\\"::after/\\\" # move root e.g., \\\"path/\\\" => \\\"after/path/\\\"\\n - \\\"before/::\\\" # reduce root e.g., \\\"before/path/\\\" => \\\"path/\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## flags\n\n* More info: https://docs.codecov.io/docs/flags\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"flags:\\n projectA: \\n paths:\\n - projectA/src\\n carryforward: false #default -- false\\n projectB:\\n paths:\\n - projectB/src\\n carryforward: true\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## comment\n\n* More info: https://docs.codecov.io/docs/pull-request-comments\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"comment:\\n layout: \\\"reach, diff, flags, files\\\"\\n behavior: default\\n require_changes: false # if true: only post the comment if coverage changes\\n require_base: no # [yes :: must have a base report to post]\\n require_head: yes # [yes :: must have a head report to post]\\n branches: # branch names that can post comment\\n - staging\\n - master\\n after_n_builds: #e.g., 5. The number of uploaded reports codecov \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n------------------------------------------\n\n## github_checks (GitHub users only)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_checks:\\n annotations: false\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### annotations\n\nSpecify whether to use GitHub Checks annotations or normal statuses. GitHub Checks are enabled by default on the [patch status](doc:commit-status#patch-status)\n\n * Type: Boolean\n * Default: true\n * More Info: [GitHub Checks](doc:github-checks-beta)","excerpt":"","slug":"codecovyml-reference","type":"basic","metadata":{"description":"","title":"","image":[]},"title":"codecov.yml Reference","__v":7,"parentDoc":"604a3fa3d6d5f00080272555","pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-07-22T19:17:20.699Z","deprecated":false},{"_id":"604a3fa3d6d5f00080272559","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{}"},{"status":400,"name":"","code":"{}","language":"json"}]},"settings":""},"category":"605e1084bc81560031aae596","sync_unique":"","body":"The default configuration for all repositories on Codecov is shown below. You can customize these values to fit your project's usage case.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"coverage:\\n range: 70..100\\n round: down\\n precision: 2\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Range\n\nThis value is used to customize the visible color range in Codecov. The first number represents the red, and the second represents green. You can change the range of colors by adjusting this configuration.\n\nFor example, `50...75` would result in any coverage less than 50% having a red background. The color would gradually change to green when approaching the 75% mark. Any coverage over 75% would result in a solid green color.\n[block:html]\n{\n \"html\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n}\n[/block]\n## Rounding\n\nCodecov will round coverage down to the precision point by default.\n\n```\n45.15313% would become 45.15%.\n62.918777% would become 62.91%.\n```\n\nYou may choose to round `up`, `down`, or `nearest`.\n\n\n## Precision\n\nYou may choose to show more precision when viewing coverage reports on Codecov. Please select a number between `0` and `5` as the number of decimal places visible in the UI and all notifications.","createdAt":"2016-08-17T14:08:10.712Z","excerpt":"Help with colors, rounding and precision","hidden":false,"isReference":false,"link_url":"","project":"57b33b5ec9a4551700b969a5","order":1,"parentDoc":"604a3fa3d6d5f00080272555","slug":"coverage-configuration","version":"604a3fa3d6d5f0008027258e","__v":1,"githubsync":"","link_external":false,"next":{"pages":[],"description":""},"title":"Coverage Configuration","type":"basic","updates":["58ae0b778e84100f00c7b778"],"user":"57b33af9eeec08220094ea97","updatedAt":"2019-12-06T17:00:07.747Z","metadata":{"title":"","description":"","image":[]}}]},{"_id":"604a3fa3d6d5f0008027254d","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"name":"","code":"{}","language":"json","status":400}]},"method":"get"},"link_url":"","project":"57b33b5ec9a4551700b969a5","title":"[Deprecating] Bash uploader","type":"basic","category":"605e1084bc81560031aae596","excerpt":"","hidden":false,"sync_unique":"","githubsync":"","next":{"pages":[],"description":""},"parentDoc":null,"updates":["583381f827f1530f00093a2d","58adea7b45c2240f00673ec2","58adec490e6cb80f00eaf0c9","5d9d06815e2e4d04739c650a","5ec6c5bcd023b502e76412f7","5ff529c9ab44d00011a94d2e","6000d5b8eafb20004421a98b","6000d65cac45d3001ac6cfc4","6000d9666e42cd0028a19232","6033cb551e4858003308e862","609297c721ed37002c1b4e7f"],"__v":10,"body":"[block:api-header]\n{\n \"title\": \"Deprecation Notice and Schedule\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Deprecation Notice\",\n \"body\": \"Support for the Bash Uploader will be deprecated on February 1st, 2022. \\n\\nPlease refer to the main [Codecov Uploader](doc:codecov-uploader) page for implementation and upgrades.\"\n}\n[/block]\nWith the [Codecov Uploader](doc:codecov-uploader) released, the Bash Uploader will now undergo the following deprecation plan:\n\n * Sept 1, 2021, to Nov 1, 2021: Codecov will conduct scheduled brownouts of the Bash Uploader. At predetermined times throughout the week, the Bash Uploader will not function. These brownout periods will initially have at least a one-week notice, before occurring but advanced notice times will decrease throughout this three-month period. Each brownout period will be publicly broadcast to users, though.\n * Nov 1, 2021, to Feb 1, 2022: Codecov will conduct random unscheduled brownouts of the Bash Uploader. With no announcement or prior disclosure, the Bash Uploader will not function. \n * Feb 1, 2022, and onward: The Bash Uploader will be fully sunset and will no longer function.\n * Note that this deprecation plan may be subject to change, but those changes will be broadcast to our user base with at least two weeks’ notice. If at any time during the deprecation window use of the Bash Uploader comprises <10% of all uploads to Codecov, we may accelerate the deprecation plan and sunset the Bash Uploader faster than anticipated. \n\nAdditional context around this release and change [can be found on our blog](https://about.codecov.io/blog/introducing-codecovs-new-uploader/).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Introduction\"\n}\n[/block]\nThe Codecov Bash uploader provides a language-agnostic alternative for sending your coverage reports to Codecov. Its usage is both simple and convenient:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bash <(curl -s https://codecov.io/bash)\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nThe main objectives of the uploader are to:\n - detect the environment\n - gather reports\n - upload them to Codecov\n\nThe above command silently requests the latest version of the uploader from Codecov and executes via Bash; all output is directed to `stdout`.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Upload token\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Not Required for some CI Providers\",\n \"body\": \"If you have a *public* project on TravisCI, CircleCI, AppVeyor, Azure Pipelines, or GitHub Actions an upload token is not required.\"\n}\n[/block]\nA unique upload token is required to identify which project the coverage belongs to. This token is located in the repository settings (`////settings`). \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/8da9774-codecov-uploadreports.png\",\n \"codecov-uploadreports.png\",\n 2306,\n 1364,\n \"#f8f2f2\"\n ],\n \"caption\": \"A repository on codecov with no uploaded coverage reports. Note the upload token.\"\n }\n ]\n}\n[/block]\nThere are three ways to provide the upload token to the Bash uploader:\n\n## Flag\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bash <(curl -s https://codecov.io/bash) -t token\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n## Environment variable\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"export CODECOV_TOKEN=\\\"token\\\"\\nbash <(curl -s https://codecov.io/bash)\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n## Loading token from a file\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"echo \\\"token\\\" > .cc_token\\nbash <(curl -s https://codecov.io/bash) -t @.cc_token\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"CI detection\"\n}\n[/block]\nThe bash uploader detects all CI providers through environment variables. This process helps to identify the source of the build and maintain a relationship back to the source of the coverage collection. \n\n- **Using Docker?** Please review [Testing with Docker](doc:testing-with-docker).\n- **Using Python Tox?** Please review [Testing with Tox](https://github.com/codecov/example-python#testing-with-tox).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Finding reports and specifying file names\"\n}\n[/block]\nCodecov can automatically detect coverage files in your project. A thorough filename search will grab everything that is known to be a coverage report. You can also specify exactly which file(s) should be uploaded.\n\nHere are some options for discovering report files:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# only upload this file\\n-f path/to/foo.bar\\n\\n# also search this folder that is outside the project directory\\n-s /home/user/reports/foo/bar\\n\\n# ignore all files at pattern *.bar\\n-f \\\"!*.bar\\\"\\n\\n# include all files at pattern *.foo\\n-f \\\"*.foo\\\"\\n\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Validating the bash script\"\n}\n[/block]\nThe Codecov bash uploader is open source, and it can be validated for correctness by calculating the \nSHASUM on download and comparing to the result we store in the GitHub repository.\n\nYou can calculate the checksum on download by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl https://codecov.io/bash | shasum -a 512\\n# Codecov provides SHA1, SHA256, and SHA512 hashes\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nThis will not check against the provided checksums provided by Codecov that are located in GitHub.\n\nYou can compare the result to the publicly posted values at `https://github.com/codecov/codecov-bash/blob/{{ VERSION }}/SHA512SUM`. We calculate and publish the SHA1, SHA256, and SHA512 checksums.\n\nFor builds with the versions of `shasum` that support the `--ignore-missing` flag, you can also verify the checksums by running\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -fLso codecov https://codecov.io/bash;\\nVERSION=$(grep -o 'VERSION=\\\\\\\"[0-9\\\\.]*\\\\\\\"' codecov | cut -d'\\\"' -f2);\\nfor i in 1 256 512\\ndo\\n shasum -a $i -c --ignore-missing <(curl -s \\\"https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM\\\")\\ndone\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nFor older `shasum` versions, you can run\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -fLso codecov https://codecov.io/bash;\\nVERSION=$(grep -o 'VERSION=\\\\\\\"[0-9\\\\.]*\\\\\\\"' codecov | cut -d'\\\"' -f2);\\nfor i in 1 256 512\\ndo\\n shasum -a $i -c <(curl -s \\\"https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM\\\" | grep -w \\\"codecov\\\")\\ndone\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Uploading process\"\n}\n[/block]\nWhen the upload script is called, the general flow is as follows:\n\n1. The CI is discovered through environment variables.\n2. Language specific processing and formatting (e.g. xcode, python). \n3. Reports are found in the filesystem.\n5. Reports are prepended with file paths and appended with file adjustments.\n6. Reports are uploaded to cloud storage for archiving (secret location).\n7. Codecov is informed of the upload, and will queue the report processing server side.\n8. Done (`exit 0`).\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"Codecov will `exit 0` to prevent failing the build, if there are issues. If you would like Codecov to exit with `1`, use `bash <(curl -s https://codecov.io/bash) -Z`.\\n\\n`exit 0` is not foolproof. Please use this command to always exit with `0`: `bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'`.\",\n \"title\": \"Exit 0\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Verbose mode\",\n \"body\": \"If there is an issue with the upload process, it helps to run in verbose mode. Supply the `-v` flag for better debugging output:\\n\\n`bash <(curl -s https://codecov.io/bash) -v`\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Arguments\"\n}\n[/block]\nThe bash uploader provides various arguments to work with many complex environments. Listed below are the full list of possible arguments and their usage.\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Argument\",\n \"h-1\": \"Usage\",\n \"0-0\": \"`-A CURL_ARGS`\",\n \"0-1\": \"Extra curl arguments to communicate with AWS.\",\n \"16-0\": \"`-X FEATURE`\",\n \"6-0\": \"`-h`\",\n \"6-1\": \"Display this help and exit\",\n \"12-0\": \"`-s DIR`\",\n \"12-1\": \"Directory to search for coverage reports.\\nAlready searches project root and artifact folders.\",\n \"13-0\": \"`-t TOKEN`\",\n \"13-1\": \"Set the private repository token\\n(option) set environment variable `CODECOV_TOKEN=:uuid`\\n \\n`-t @/path/to/token_file`\\n`-t uuid`\",\n \"9-0\": \"`-n NAME`\",\n \"9-1\": \"Custom defined name of the upload. Visible in Codecov UI\",\n \"3-0\": \"`-e ENV`\",\n \"3-1\": \"Specify environment variables to be included with this build\\nAlso accepting environment variables: `CODECOV_ENV=VAR,VAR2`\\n\\n`-e VAR,VAR2`\",\n \"5-0\": \"`-f FILE`\",\n \"5-1\": \"Target file(s) to upload\\n`-f \\\"path/to/file\\\"` only upload this file\\n skips searching unless provided patterns below\\n`-f '!*.bar'` ignore all files at pattern *.bar\\n`-f '*.foo'` include all files at pattern *.foo\\n\\nMust use single quotes.\\nThis is non-exclusive, use `-s \\\"*.foo\\\"` to match specific paths.\",\n \"16-1\": \"Toggle functionalities\\n\\n`-X gcov` Disable gcov\\n`-X coveragepy` Disable python coverage\\n`-X fix` Disable report fixing\\n`-X search` Disable searching for reports\\n`-X xcode` Disable xcode processing\\n`-X network` Disable uploading the file network\\n`-X gcovout` Disable gcov output \\n`-X html` Enable coverage for HTML files\",\n \"8-0\": \"`-N`\",\n \"8-1\": \"The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository provider's API, the parent is determined via finding the closest ancestor to the commit.\",\n \"11-0\": \"`-R ROOT_DIR`\",\n \"11-1\": \"Used when not in git/hg project to identify project root directory\",\n \"4-0\": \"`-F FLAG`\",\n \"4-1\": \"Flag the upload to group coverage metrics\\n`-F unittests` This upload is only unittests\\n`-F integration` This upload is only integration tests\\n`-F ui,chrome` This upload is Chrome - UI tests\",\n \"1-0\": \"`-c`\",\n \"1-1\": \"Move discovered coverage reports to the trash\",\n \"17-0\": \"`-Z`\",\n \"17-1\": \"Exit with 1 if not successful. Default will Exit with 0\",\n \"35-0\": \"**xcode**\",\n \"36-0\": \"`-D`\",\n \"36-1\": \"Custom Derived Data Path for Coverage.profdata and gcov processing\\nDefault `'~/Library/Developer/Xcode/DerivedData'`\",\n \"37-0\": \"`-J`\",\n \"37-1\": \"Specify packages to build coverage. Uploader will only build these packages.\\nThis can significantly reduces time to build coverage reports.\\n`-J 'MyAppName'` Will match `\\\"MyAppName\\\"` and `\\\"MyAppNameTests\\\"`\\n`-J '^ExampleApp$'` Will match only `\\\"ExampleApp\\\"` not `\\\"ExampleAppTests\\\"`\",\n \"28-0\": \"**gcov**\",\n \"31-0\": \"`-g GLOB`\",\n \"31-1\": \"Paths to ignore during gcov gathering\",\n \"30-0\": \"`-G GLOB`\",\n \"30-1\": \"Paths to include during gcov gathering\",\n \"33-0\": \"`-p DIR`\",\n \"33-1\": \"Project root directory\\nAlso used when preparing gcov\",\n \"32-0\": \"`-k PREFIX`\",\n \"32-1\": \"Prefix filepaths to help resolve path fixing\",\n \"34-0\": \"`-x GCOVEXE`\",\n \"34-1\": \"gcov executable to run. Defaults to `'gcov'`\",\n \"29-0\": \"`-a GCOV_ARGS`\",\n \"29-1\": \"Extra arguments to pass to gcov\",\n \"22-0\": \"**env vars**\",\n \"23-1\": \"Specify the branch name\",\n \"23-0\": \"`-B BRANCH`\",\n \"25-0\": \"`-C SHA`\",\n \"25-1\": \"Specify the commit SHA. **Please use the long version** to ensure a match between the submitted SHA and the git provider's API response.\",\n \"26-0\": \"`-P PR`\",\n \"26-1\": \"Specify the pull request number\",\n \"24-0\": \"`-b BUILD`\",\n \"24-1\": \"Specify the build number\",\n \"27-0\": \"`-T TAG`\",\n \"27-1\": \"Specify the git tag\",\n \"22-1\": \"Used to override pre-existing CI environment variables\",\n \"2-0\": \"`-d`\",\n \"2-1\": \"Don't upload, but dump upload file to stdout\",\n \"10-0\": \"`-q PATH`\",\n \"10-1\": \"Write upload file to path\",\n \"7-0\": \"`-K`\",\n \"7-1\": \"Remove color from the output\",\n \"15-0\": \"`-v`\",\n \"15-1\": \"Verbose mode\",\n \"14-0\": \"`-U CURL_ARGS`\",\n \"14-1\": \"Extra curl arguments to communicate with Codecov. e.g., `-U \\\"--proxy http://http-proxy\\\"`\",\n \"18-0\": \"**enterprise**\",\n \"19-1\": \"owner/repo slug used instead of the private repo token in Enterprise\\n(option) set environment variable `CODECOV_SLUG=:owner/:repo`\\n(option) set in your `codecov.yml` `\\\"codecov.slug\\\"`\",\n \"19-0\": \"`-r SLUG`\",\n \"21-0\": \"`-u URL`\",\n \"21-1\": \"Set the target url for Enterprise customers\\nNot required when retrieving the bash uploader from your CCE\\n(option) Set environment variable `CODECOV_URL=https://my-hosted-codecov.com`\",\n \"20-0\": \"`-S PATH`\",\n \"20-1\": \"File path to your cacert.pem file used to verify ssl with Codecov Enterprise (optional)\\n(option) Set environment variable: `CODECOV_CA_BUNDLE=\\\"/path/to/ca.pem\\\"`\"\n },\n \"cols\": 2,\n \"rows\": 38\n}\n[/block]","createdAt":"2016-08-19T19:44:15.013Z","isReference":false,"link_external":false,"order":12,"slug":"about-the-codecov-bash-uploader","user":"5b47e58599e0430003d8e823","version":"604a3fa3d6d5f0008027258e","updatedAt":"2021-07-02T16:24:47.019Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-08-06T22:15:52.916Z","children":[],"childrenPages":[]},{"_id":"615b6ff5d7b29e01e1bcf3ca","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Deprecated Uploader Migration Guide","updates":["61fc72d5e0fbff003136d21a"],"type":"basic","slug":"deprecated-uploader-migration-guide","excerpt":"","body":"As a result of the [uploader deprecation plan](https://about.codecov.io/blog/codecov-uploader-deprecation-plan/), users will need to migrate to our new [Codecov Uploader](doc:codecov-uploader). This page serves as a guide to help users with that process.\n\n**The new uploader is still undergoing active development to be in parity with the old bash uploader. As such, some features have not yet been brought over.**\n\n###Bitrise Step\nUpgrade to version 3.0+ and provide an `OS` name as an argument.\n\n###Bash Uploader\nReplace all calls to the bash uploader \n\n###CircleCI Orb\nUpgrade to version 3.0+\n\n###GitHub Action\nUpgrade to version 2.0+\n\n###Python Uploader\n1. Remove `codecov` from any dependency file (e.g. `requirements.txt`)\n2. Replace any calls to Codecov with the new [Codecov Uploader](doc:codecov-uploader) \n3. If you are using [coveragepy](https://coverage.readthedocs.io/en/6.0/) to collect code coverage, you will need to add\n```\ncoverage xml\n```\nbefore calling the new uploader.\n\n###Ruby Uploader\n1. Remove the `codecov` gem from any dependency file (e.g. `Gemfile`)\n2. If you are using [simplecov](https://github.com/simplecov-ruby/simplecov) to collect code coverage, you will need to update your helper files from\n```\nrequire 'codecov'\nSimpleCov.formatter = SimpleCov::Formatter::Codecov\n```\nto \n```\nrequire 'simplecov-cobertura'\nSimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter\n```\n(See [our Ruby standard](https://github.com/codecov/ruby-standard-2/blob/master/spec/spec_helper.rb#L4-L5))\n3. Add a call to our new [Codecov Uploader](doc:codecov-uploader) in your CI pipeline.","order":13,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-10-04T19:45:54.422Z","createdAt":"2021-10-04T21:19:49.835Z","updatedAt":"2022-02-04T02:57:58.983Z","user":"5a5f7365678e1d0012d7cbd8","category":"605e1084bc81560031aae596","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":1,"parentDoc":null,"deprecated":false,"children":[],"childrenPages":[]},{"_id":"60f5b6822fd4200069e66d8e","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"GitHub OAuth Admin Authorization","updates":["61fa7acdbaf5e9004fd03aac"],"type":"basic","slug":"github-oauth-application-authorization","excerpt":"Connecting Codecov to Github for an Individual User","body":"[block:api-header]\n{\n \"title\": \"GitHub Users: How to Request Access to Codecov from a Github Administrator\"\n}\n[/block]\nDepending on the configuration of the various GitHub Organizations of which you are a member, GitHub Organization admins may need to approve the use of Codecov to provide full access to your GitHub Organizations within the Codecov application. \n\nThe remainder of this document will describe how to ensure the Codecov application is approved to access your all of your GitHub Organizations properly as an individual user (described as #1 above). \n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"You can Re-Request Access via the GitHub UI\",\n \"body\": \"If you did not give Codecov access to your GitHub Organization on signup, you can do so [directly from your GitHub account's settings page](https://github.com/settings/connections/applications/c68c81cbfd179a50784a).\\n\\nNote that you will need to be logged into GitHub for the above link to work.\"\n}\n[/block]\nThe easiest way to ensure the Codecov application can access all your Github Organizations is to review the list of accessible **Organization Access** list (see image) during your first login to the Codecov Application: \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/2a7d1e6-github_oauth_1_annotated.png\",\n \"github_oauth_1_annotated.png\",\n 1268,\n 1502,\n \"#f7f6f7\"\n ],\n \"caption\": \"The approval screen in the GitHub OAuth login flow. Accessible organizations display a green check mark. Organizations that require admin approval display a gray X. Denied organizations display a red X.\"\n }\n ]\n}\n[/block]\nIf a GitHub Organization you wish to integrate with Codecov has a \"Request\" button in the Organization Access list, be sure to click the \"Request\" button. This will ensure that an Admin of the organization on GitHub receives a notification to approve the Codecov application.\n[block:api-header]\n{\n \"title\": \"GitHub Admins: How to Approve Access to Codecov\"\n}\n[/block]\nIf you are a GitHub Organization Admin, access approval for the Codecov application is straightforward. \n\nFirst, you will receive an email notification from GitHub indicating the access request:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/e8c09b6-github_oauth_2_annotated.png\",\n \"github_oauth_2_annotated.png\",\n 2002,\n 886,\n \"#f7f7f8\"\n ],\n \"caption\": \"The email sent to GitHub Admins when a user has requested access to their GitHub Organization on behalf of Codecov.\"\n }\n ]\n}\n[/block]\nClicking the approval link will lead to: \n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/91004bc-github_oauth_3_annotated.png\",\n \"github_oauth_3_annotated.png\",\n 2176,\n 998,\n \"#f6f6f7\"\n ],\n \"caption\": \"The Codecov application access approval page.\"\n }\n ]\n}\n[/block]\nOn this page, the GitHub Admin can click \"Grant access\" to grant the Codecov application access to their GitHub Organization.\n\nOnce this step has been completed, users can log into Codecov and resync their repositories from the organization overview page (i.e., https://app.codecov.io/gh) and the newly approved organization should appear in the user's Organization List on Codecov.\n\nMoving forward, GitHub Organization members logging into Codecov will see the organization listed with a green check mark in the OAuth flow, as follows:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/5500b01-github_oauth_4_annotated.png\",\n \"github_oauth_4_annotated.png\",\n 981,\n 1535,\n \"#f2f0f0\"\n ],\n \"caption\": \"The GitHub OAuth flow, showing the now approved organization in the Organization Access list.\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Troubleshooting\"\n}\n[/block]\n### I Cannot See my Organization in the Codecov UI. \n\nThere are several reasons this could be the case, but the majority of access errors can be attributed to one of the following:\n\n* The Codecov Application was previously denied by your Organization Admin.\n* The Access Request for the Organization is still pending approval by your GitHub Admin. \n* The \"Request\" button was not clicked for the Organization during the login flow. \n\nEach of these access errors, and how to correct them, are outlined below.\n\n### The Codecov Application was previously denied by your Organization Admin\n\nIf, upon logging into Codecov for the first time, you see a red X by your organization name in the Organization Access list:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/e4e61d0-github_oauth_5_annotated.png\",\n \"github_oauth_5_annotated.png\",\n 911,\n 1284,\n \"#ebe8ea\"\n ],\n \"caption\": \"The GitHub OAuth application flow showing the status of an organization that previously denied the Codecov application's access request.\"\n }\n ]\n}\n[/block]\nthis indicates that the Codecov application was previously denied. In this case, you will need to contract your GitHub Organization administrator and ask them to review and approve the Codecov application manually. The can do so by visiting the following URL:\n\n```\nhttps://github.com/organizations//settings/oauth_application_policy\n```\n\nand clicking the \"Grant Access\" button for the Codecov application. \n\n### The Access Request for the Organization is still pending approval by your GitHub Admin.\n\nA requested organization will not be seen until the request is approved by your Organization Admin. Therefore, you may need to reach out to your admin and see if the request has been approved. If it has, and you are still not seeing the organization in Codecov's UI, it is recommended to click the \"sync\" link on Codecov's organization overview page, found at [https://app.codecov.io/gh](https://app.codecov.io/gh). \n\n### The \"Request\" button was not clicked for the Organization during the login flow. \n\nIf you missed clicking on the Request button for your organization during login, you must revoke the Codecov Application in the GitHub UI and login to Codecov again. During login, be sure to click the \"Request\" button on the GitHub Organization(s) you would like to have access to Codecov.\n\nTo revoke the Codecov Application:\n1. Visit: https://github.com/settings/applications\n2. Click on the \"Authorized OAuth Apps\" tab\n3. Click \"Revoke\" from the \"...\" menu located by the Codecov Application in the Applications List.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/637067c-github_oauth_6_annotated.png\",\n \"github_oauth_6_annotated.png\",\n 1079,\n 693,\n \"#f8f6f8\"\n ],\n \"caption\": \"The Authorized OAuth Apps Applications List.\"\n }\n ]\n}\n[/block]\nOnce you have revoked access to the Codecov Application, you can login to Codecov again. This triggers the GitHub OAuth Application flow and will display your organization's with the \"Request\" button in the Access List.","order":14,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-07-19T01:17:56.028Z","createdAt":"2021-07-19T17:29:38.718Z","updatedAt":"2022-02-16T16:33:52.434Z","user":"5b95e8b206ca8a00031f1401","category":"605e1084bc81560031aae596","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":1,"parentDoc":null,"deprecated":false,"children":[],"childrenPages":[]}]},{"_id":"604a3fa3d6d5f00080272535","reference":false,"createdAt":"2016-08-17T11:14:43.598Z","from_sync":false,"order":4,"slug":"enterprise","project":"57b33b5ec9a4551700b969a5","sync":{"url":"","isSync":false},"title":"Codecov Self-Hosted","__v":0,"version":"604a3fa3d6d5f0008027258e","isAPI":false,"pages":[{"_id":"604a3fa3d6d5f00080272563","category":"604a3fa3d6d5f00080272535","next":{"pages":[],"description":""},"title":"Interested in Self-Hosting?","user":"5b47e58599e0430003d8e823","__v":0,"body":"","sync_unique":"","type":"link","createdAt":"2016-08-17T20:17:59.400Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":true,"link_url":"https://about.codecov.io/self-hosted","order":0,"api":{"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"slug":"inquire","version":"604a3fa3d6d5f0008027258e","updates":[],"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","updatedAt":"2021-01-08T20:43:28.883Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-09T18:49:30.828Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027258b","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[{"type":"doc","icon":"file-text-o","name":"Self-Hosted Configuration","slug":"configuration","category":"Codecov Self-Hosted"}]},"title":"Codecov Self-Hosted Install Guide","updates":["600ae2c3980c8b00735911f0"],"type":"basic","slug":"installing-codecov-self-hosted","excerpt":"","body":"[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"Full deployment scripts using Terraform or Helm can be found for AWS, GCP, and Azure here: https://github.com/codecov/enterprise-resources\\n\\nCodecov Self-hosted does not endorse or support custom deployments beyond AWS, GCP, and Azure.\",\n \"title\": \"Deployment using Terraform or Helm for AWS, GCP, and Azure\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Prerequisites to Installing Codecov Self-Hosted\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Prerequisite\",\n \"h-1\": \"Description\",\n \"0-0\": \"**[Basic Ingredients List](ttps://docs.codecov.io/docs/quick-start#ingredients-list)**\",\n \"0-1\": \"1. Git-based code host (GitHub.com, Github Enterprise, Gitlab Community Edition, Gitlab Enterprise Edition, Bitbucket, Bitbucket Server)\\n2. Coverage reports generation\\n3. A CI provider\",\n \"1-0\": \"**Installation Lead** \",\n \"1-1\": \"Installing Codecov requires deep knowledge of your organization’s infrastructure and how it is implemented, including your CI and Security Configurations. Oftentimes these stakeholders reside on the Operations or SRE team.\",\n \"2-1\": \"In order to complete the Codecov install your team will need an account key (provided by Codecov), access to object storage, your Kubernetes Cluster (if applicable) / Compute, Source Control Provider, your Database, and Redis.\",\n \"2-0\": \"**Access Controls** \",\n \"3-0\": \"**Orchestration** \",\n \"3-1\": \"Managed Kubernetes\",\n \"4-0\": \"**Deployment Management** \",\n \"4-1\": \"Terraform, or, for testing an install, Docker Compose\",\n \"5-0\": \"**Software Distribution** \",\n \"5-1\": \"Access to DockerHub from within your network\",\n \"6-0\": \"**Hardware** \",\n \"6-1\": \"Managed virtual private cloud (AWS, GCP, Azure) with min. 1 machine for installation testing\",\n \"7-0\": \"**Database** \",\n \"7-1\": \"Postgres 10.X LTS via managed cloud (e.g., RDS, CloudSQL, or Azure PostgreSQL)\",\n \"8-0\": \"**Cache** \",\n \"8-1\": \"Redis via managed services (e.g., ElastiCache)\",\n \"9-0\": \"**Storage** \",\n \"9-1\": \"S3 compatible storage (S3, GCS, Azure Blob Storage, Ceph, Minio)\",\n \"10-0\": \"**Codecov License Key** \",\n \"10-1\": \"Provided by the Codecov team, [which you can request here](https://about.codecov.io/self-hosted/)\"\n },\n \"cols\": 2,\n \"rows\": 11\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"S3 Compatibility Requirements\",\n \"body\": \"Please note, to be able to use any S3 / minio compatible storage, you must be able to grant at least the following policies. The application will **not** work if any of these cannot be granted.\\n\\n```\\n\\\"s3:GetObject\\\",\\n\\\"s3:PutObject\\\",\\n\\\"s3:AbortMultipartUpload\\\",\\n\\\"s3:ListMultipartUploadParts\\\",\\n\\\"s3:GetBucketLocation\\\",\\n\\\"s3:HeadBucket\\\",\\n\\\"s3:ListBucket\\\",\\n\\\"s3:ListBucketVersions\\\"\\n```\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Sizing guide for Codecov infrastructure\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"\",\n \"h-1\": \"Small\",\n \"h-2\": \"Medium\",\n \"h-3\": \"Large\",\n \"h-4\": \"X-Large\",\n \"h-5\": \"Redis (non clustered only!)\",\n \"h-6\": \"Database (PostgreSQL)\",\n \"0-0\": \"Approximate **peak** uploads per hour\",\n \"0-1\": \"< 100\",\n \"0-2\": \"< 1,000\",\n \"0-3\": \"< 2,500\",\n \"0-4\": \"5,000+\",\n \"0-5\": \"1 cpu / 1.5 GB\",\n \"0-6\": \"2 cpu / 5GB RAM\",\n \"1-0\": \"Approximate **peak** report size\",\n \"1-1\": \"< 50 MB\",\n \"1-2\": \"< 100 MB\",\n \"1-3\": \"< 300 MB\",\n \"1-4\": \"< 1 GB\",\n \"1-5\": \"2 cpu / 3 GB\",\n \"1-6\": \"6 cpu / 16 GB RAM\",\n \"2-0\": \"Web (minimum)\",\n \"2-1\": \"2 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"2-2\": \"3 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"2-3\": \"6 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"2-4\": \"9 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"2-5\": \"2 cpu / 6 GB\",\n \"2-6\": \"8 cpu / 26 GB RAM\",\n \"4-0\": \"Worker (minimum)\",\n \"4-1\": \"3, compute optimized - 4vCPU / 16 GB RAM\",\n \"4-2\": \"9, compute optimized - 4vCPU / 16 GB RAM\",\n \"4-3\": \"15 instances, RAM optimized - 4vCPU / 8 GB RAM\",\n \"4-4\": \"23, compute optimized - 4vCPU / 16 GB RAM\",\n \"4-5\": \"4 cpu / 14 GB\",\n \"4-6\": \"16 cpu / 40 GB RAM\",\n \"5-0\": \"Redis (**non clustered only!**)\",\n \"6-0\": \"Database (PostgreSQL)\",\n \"5-1\": \"1 cpu / 1.5 GB\",\n \"5-2\": \"2 cpu / 3 GB\",\n \"5-3\": \"2 cpu / 6 GB\",\n \"5-4\": \"4 cpu / 14 GB\",\n \"6-1\": \"2 cpu / 5GB RAM\",\n \"6-2\": \"6 cpu / 16 GB RAM\",\n \"6-3\": \"8 cpu / 26 GB RAM\",\n \"6-4\": \"16 cpu / 40 GB RAM\",\n \"3-0\": \"API (minimum) currently using about 30-40% of Web capacity. API will handle more responsibilities in the future. Resource usage might increase.\",\n \"3-1\": \"2 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"3-2\": \"2 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"3-3\": \"4 instances, RAM optimized - 2vCPU / 8 GB RAM\",\n \"3-4\": \"6 instances, RAM optimized - 2vCPU / 8 GB RAM\"\n },\n \"cols\": 5,\n \"rows\": 7\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Infrastructure Monitoring\",\n \"body\": \"It is highly recommended to set up infrastructure monitoring from Day 1 of usage of Codecov Self-hosted in Grafana or a similar reporting tool.\\n\\n**Key metrics to monitor:**\\n\\n - Celery Queue Size should always be trending towards zero.\\n - CPU usage on the worker node. We recommend no more than 2 workers per compute node, due to high CPU requirements.\\n - Storage growth. Depending on the frequency of uploads and the report size, be sure to allocate sufficient DB storage.\\n - Due to resource consumption requirements, and different needs to prioritize CPU over RAM, it is strongly recommended to separate web and worker instances. \\n\\nRead more about available [StatsD metrics here](doc:metrics-exposed-to-statsd)\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Bare Minimum Steps to a Working Implementation of Self-Hosted Codecov\"\n}\n[/block]\n### 1. Receive Needed credentials\n * Receive an Enterprise License key from Codecov staff and placed it into your [codecov.yml](doc:configuration)\n\n\n### 2. Setup External Services\n\n * Create an [OAuth level integration](doc:set-up-oauth-login) in your repo service provider and have the Client ID and Client Secret ready to use.\n * If using GitHub or Github Enterprise, you will have created a GitHub App Integration as well.\n * Create an external, managed, postgres database (e.g., AWS RDS, Google Cloud SQL, etc) and have the url with username and credentials in your codecov.yml\n * Create an object storage mechanism (e.g., an AWS S3 bucket, a Google Cloud Storage Bucket, etc) and have the bucket name on hand, plus credentials to supply to the codecov.yml\n * Caveat: If you’re using S3, you can instead ensure codecov runs on a VM with a StorageAdmin S3 role, or using a suitably permissioned* S3 role.\n * Create a separate, managed Redis database (e.g., AWS Elasticache, etc) and have the credentials to supply to the codecov.yml.\n\n### 3. Edit Configuration\n * Supply the needed configuration derived from the above steps into the [codecov.yml](doc:configuration)\n \n### 4. Setup Codecov Application Infrastructure \n\n * Navigate to our configuration repo: https://github.com/codecov/enterprise-resources\n * Choose the configuration preset that makes the most sense for your infrastructure and needs.\n * Follow the instructions there to ensure and ensure your codecov installation is working by navigating to it in your browser.\n\nRead more about [Enterprise Deployment Strategies](doc:codecov-enterprise-deployment-strategies) meant for production use.\n\n\n### 5. Test Codecov\n\n[Integrate Codecov into your CI](doc:codecov-uploader) and upload a coverage report\nEnsure that Codecov [comments](doc:pull-request-comments) and [status checks](doc:commit-status) appear on Pull Requests","order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"installing-codecov","slugUpdatedAt":"2021-01-22T18:34:26.900Z","createdAt":"2021-01-08T20:18:56.432Z","updatedAt":"2022-05-25T18:55:02.828Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":2,"parentDoc":null,"deprecated":false,"children":[{"_id":"604a3fa3d6d5f00080272567","isReference":false,"next":{"pages":[{"type":"doc","icon":"file-text-o","name":"Set Up Oauth Login (Self-Hosted)","slug":"set-up-oauth-login","category":"Codecov Self-Hosted"}],"description":""},"order":0,"__v":8,"body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Overview\"\n}\n[/block]\nCodecov configuration is done through a yaml file or environment variables.\n\nThe environment variables must be in the format of `CATEGORY__KEY=\"VALUE\"`, note the two underscores between category and key.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n codecov_url: \\\"value\\\"\\n codecov_api_url: \\\"value\\\" # Codecov version v4.6 and later\\n api_allowed_hosts: # Codecov version v4.6 and later\\n - \\\"value\\\"\\nservices:\\n notifications:\\n slack: \\\"value\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIf using environment variables, would become:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"export SETUP__CODECOV_URL=\\\"value\\\"\\nexport SETUP__CODECOV_API_URL=\\\"value\\\" # Codecov version v4.6 and later\\nexport SERVICES__NOTIFICATIONS__SLACK=\\\"value\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Enterprise License\"\n}\n[/block]\nProvided by Codecov staff which is unique to each company. [You can request a license key here.](https://about.codecov.io/self-hosted/) \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n enterprise_license: \\\"very-long-license-key\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Codecov URL\"\n}\n[/block]\nThe base url of your Codecov Enterprise instance\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Do not add a trailing slash\",\n \"body\": \"If you are encountering errors on uploads, or clicking links in statuses or comments, confirm you did not add a trailing slack at the end of this value.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n codecov_url: \\\"https://codecov.your-company.com\\\"\\n codecov_api_url: \\\"https://codecov.your-company.com\\\" #needed in Codecov version v4.6 and later\\n\\n# or you may use an IP address with an optional port\\nsetup:\\n codecov_url: \\\"http://192.168.1.1:5000\\\"\\n codecov_api_url: \\\"http://192.168.1.1:5000\\\" #needed in Codecov version v4.6 and later\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThis url is used, primarily, in [Commit Status](doc:commit-status), [Pull Request Comments](docs:pull-request-comments) and [Notifications](doc:notifications) as the redirect url to get back to your Codecov.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Add custom CI domains\"\n}\n[/block]\nAn important part of Codecov's process is to check the CI status of commits in order to ensure coverage data is complete and generated by a successful CI build. Add you CI domains in the configuration to ensure they are properly detected.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n ci_providers:\\n - jenkins.mydomain.com # domain name only\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Guest Access\"\n}\n[/block]\n*By default*: all users (logged in or guests) can view reports for **public repositories** hosted on Github/Bitbucket/Gitlab (not their respective Enterprise products).\nYou may disable guest access which will require all users to login to your Enterprise instance in order to view any project or interact with the product at all.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n guest_access: off\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Cookie Secret\"\n}\n[/block]\n\nString used to encrypt secure cookies with. If changed user sessions will exprie and require login to access system again.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n http:\\n cookie_secret: \\\"some-random-string\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n> Previously at `setup.cookie_secret` which is automatically copied under `http` node.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Database\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n database_url: postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB_NAME}\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThe full regular expression the url gets parsed through is the following:\n```\npostgres://([\\w\\-]*):?([\\w\\-]*)@([\\w\\-\\.]+):?(\\d+)/?([\\w\\-]+)\n```\n\nThe regular expression for the user and password is `[\\w\\-]*`, some random-generated passwords contain commas and other characters. Please change the password, if necessary, to fit the regular expression above.\n\nTest your string against this regular expression in `bash` via:\n\n```sh\necho \"insert-string-here\" | python -c \"import sys, re;print('Passed' if re.match('postgres://([\\w\\-]*):?([\\w\\-]*)@([\\w\\-\\.]+):?(\\d+)/?([\\w\\-]+)', sys.stdin.read()) else 'Failed');\"\n```\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Redis\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Redis Cluster Mode is not supported\",\n \"body\": \"Due to a lack of cluster mode support in the underlying message queuing system we use, Codecov can not support clustered Redis at this time.\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Encryption in transit not supported\",\n \"body\": \"Currently accessing Redis via TLS is not supported.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n redis_url: redis://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB_NAME}\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\nYour Redis instance is used to quickly upload reports for queueing. The instance size of Redis can vary based on (a) size of coverage reports, (b) frequency of uploads, and (c) number of workers processing reports. Recommended 1GB or larger.\n\nThe full regular expression is:\n```\nredis://([\\w\\-]*)?:?([\\w\\-]*)?@?([\\w\\-\\.]+):?(\\d+)/?([\\w\\-]+)\n```\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Restrict HTTP Connections\"\n}\n[/block]\nYou may restrict the domains that [Notifications](doc:notifications) can connect to.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n notifications:\\n slack: \\\"myteam.slack.com\\\" # can only send messages to myteam.slack.com\\n gitter: off \\t\\t\\t\\t\\t\\t # disable gitter notifications\\n webhook: \\\"domain.com\\\" # webhooks can only be sent to domain.com\\n irc: off \\t\\t\\t\\t\\t\\t\\t \\t\\t # disable irc\\n hipchat: off \\t\\t\\t\\t\\t # disable hipchat\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Global Upload Tokens\"\n}\n[/block]\nEach Linked Service Provider may have a **Global Upload Token** to simplify the upload process. To specify your upload token please append a unique string to your service provider.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_enterprise:\\n global_upload_token: \\\"ghe-123abc\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"body\": \"When you upload using the global token, you **must** include the global token **AND** the `owner/repo` slug to accept uploads. One option is to supply `-r` argument, you may also provide this setting in the `codecov.yml` file.\\n\\nNot providing the slug of the repo will result in 4xx errors.\",\n \"title\": \"Global Token Upload Settings\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bash <(curl -s https://mycodecov.company.com/bash) -t \\\"ghe-123abc\\\" -r owner/repo\",\n \"language\": \"shell\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Restrict Organizations\"\n}\n[/block]\nYou may restrict users to require membership to at least one team/organization.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github:\\n organizations:\\n - \\\"awesome-team\\\"\\n - \\\"modest_mice\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nAny user who attempt to login **must** be a member of either `awesome-team` or `modest_mice`. This configuration works for GitHub, Bitbucket and GitLab service providers.\n[block:api-header]\n{\n \"title\": \"Restrict Teams (GitHub Only)\"\n}\n[/block]\nAs of Codecov Enterprise 4.4.6, GitHub and GitHub Enterprise users can restrict login based on organization *and* team if desired. Team based restrictions will only work if the organization is defined. Otherwise the team list is ignored. Note that both team and organization lists are case sensitive.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_enterprise:\\n organizations:\\n - \\\"Great Company\\\"\\n teams:\\n - \\\"My Great Team\\\"\\n \\n# The following WILL NOT work. Organizations must be supplied as well.\\ngithub_enterprise:\\n teams:\\n - \\\"My Great Team\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Team Restriction Exists for GitHub and GitHub Enterprise Only\",\n \"body\": \"Currently only GitHub and GitHub Enterprise users can use team-based restrictions. \\n\\nDefining a `teams` block for any other repository provider in your codecov.yml will likely cause yaml validation to fail.\"\n}\n[/block]\nNote that organization and team checking is inclusive. For example, if you specify multiple organizations and multiple teams, this check will pass if the user belongs to any of the listed organizations *and* any of the listed teams.","category":"604a3fa3d6d5f00080272535","link_external":false,"slug":"configuration","user":"5b47e58599e0430003d8e823","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"method":"get"},"createdAt":"2016-08-18T11:30:00.113Z","hidden":false,"link_url":"","parentDoc":"604a3fa3d6d5f0008027258b","type":"basic","updates":["5bf154ffd9399700313d957a","5fbf0a64e76078003a59ed8b","6026e58da317d6001e6c5aa7","60a80b1a32c95c0019793bc9"],"version":"604a3fa3d6d5f0008027258e","excerpt":"","githubsync":"","project":"57b33b5ec9a4551700b969a5","sync_unique":"","title":"Self-Hosted Configuration","updatedAt":"2022-03-09T21:00:11.036Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-11-25T22:05:11.811Z"},{"_id":"604a3fa3d6d5f00080272566","title":"Set Up Oauth Login (Self-Hosted)","type":"basic","__v":5,"link_url":"","order":1,"parentDoc":"604a3fa3d6d5f0008027258b","project":"57b33b5ec9a4551700b969a5","slug":"set-up-oauth-login","createdAt":"2016-08-18T11:07:35.430Z","hidden":false,"link_external":false,"next":{"description":"","pages":[{"type":"doc","icon":"file-text-o","name":"Self-Hosted Deployment Strategies","slug":"codecov-enterprise-deployment-strategies","category":"Codecov Self-Hosted"}]},"user":"5b47e58599e0430003d8e823","body":"A service provider is the product you use to host your source code. Codecov integrates with GitHub, Github Enterprise, Bitbucket, Bitbucket Server (formally Stash), GitLab and GitLab Enterprise. \n\nPlease choose one or more provider to link with your Codecov Enterprise via Oauth login. This step is mandatory for setup. \n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Do not indent your service provider configuration\",\n \"body\": \"A common configuration error is to indent the service provider configuration under the setup block in your codecov.yml. This will result in errors when running codecov enterprise. \\n\\nWhen adding service providers, be sure to add them to the codecov.yml as follows:\\n\\n``` \\nsetup:\\n # various setup configs\\ngithub_enterprise:\\n # provider config\\n```\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Are you using Github.com or Github Enterprise?\",\n \"body\": \"In addition to setting up the Oauth login below (which is mandatory), it is strongly recommended to use the [Github App Integration for Codecov Self-Hosted](doc:how-to-create-a-github-app-for-codecov-enterprise)\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitHub.com\"\n}\n[/block]\nBelow is the guide to link **Github.com** to your Codecov Self-Hosted.\n\n## Step 1 - Create a new application\n1. Create a new application at `https://github.com/settings/applications/new`\n2. Fill in an Application Name, ex `Codecov Enterprise`\n3. (optional) Upload [Codecov avatar](https://avatars2.githubusercontent.com/u/8226205?v=3&s=200)\n4. Specify Homepage URL to your CE endpoint `https://codecov-enterprise-hostname.com`\n5. Specify the Authorization Callback URL `https://codecov-enterprise-hostname.com/login/github`\n6. Click **Register Application**\n - Store the **Client ID** and **Client Secret** for use in the configuration below\n\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your self-hosted `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github:\\n client_id: \\\"Client ID\\\"\\n client_secret: \\\"Client Secret\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart\n\nRestart your Codecov Self-Hosted to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitHub Enterprise\"\n}\n[/block]\nYour Github Enterprise (GHE) is a self-hosted instance of Github. It likely located behind your firewall. Codecov Self-Hosted will need to communicate with your GHE to function properly. Please follow these configuration steps to setup your instance properly.\n\nPlease replace `https://enterprise-hostname.com` with the root url of your GHE.\n\n## Step 1 - Create a new application\n1. Create a new application at `https://enterprise-hostname.com/settings/applications/new`\n2. Fill in an Application Name, ex `Codecov Self-Hosted`\n3. (optional) Upload [Codecov avatar](https://avatars2.githubusercontent.com/u/8226205?v=3&s=200)\n4. Specify Homepage URL to your Codecov Self-Hosted endpoint `https://codecov-enterprise-hostname.com`\n5. Specify the Authorization Callback URL `https://codecov-enterprise-hostname.com/login/ghe`\n6. Click **Register Application**\n - Store the **Client ID** and **Client Secret** for use in the configuration below\n\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your enterprise `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_enterprise:\\n url: \\\"https://enterprise-hostname.com\\\"\\n api_url: \\\"https://enterprise-hostname.com/api/v3\\\"\\n client_id: \\\"Client ID\\\"\\n client_secret: \\\"Client Secret\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart\n\nRestart your Codecov Self-Hosted instance to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Bitbucket.org\"\n}\n[/block]\nBelow is the guide to link **Github.com** to your Codecov Self-Hosted Instance.\n\n## Step 1 - Add OAuth consumer\n1. Create a new OAuth consumer\n - Goto `https://bitbucket.org/account/user/USERNAME/oauth-consumers/new`\n - Replace `USERNAME` with your username or team name above\n - You may review [Bitbucket's guide](https://confluence.atlassian.com/bitbucket/integrate-another-application-through-oauth-372605388.html) too\n2. Fill in an Application Name, ex `Codecov Self-Hosted`\n3. Fill in an Callback URL to `http://codecov.domain.com/login/bitbucket`\n4. Fill in an URL to `http://codecov.domain.com/bb`\n5. Toggle the permissions as seen in the image below.\n6. Click **Save**\n7. In your list of **OAuth Consumers** click on your new entry.\n - Copy the **Key** and **Secret** for your codecov.yml\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/047a83b-Screen_Shot_2016-08-23_at_10.45.03_AM.png\",\n \"Screen Shot 2016-08-23 at 10.45.03 AM.png\",\n 1234,\n 668,\n \"#7f7f7f\"\n ]\n }\n ]\n}\n[/block]\nIn addition, this box must be checked in order for BitBucket to share the credentials back to Codecov.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b08a564-f322c7d4-c089-4cfd-a881-9eeac49b2190.png\",\n \"f322c7d4-c089-4cfd-a881-9eeac49b2190.png\",\n 671,\n 108,\n \"#f8f9fa\"\n ]\n }\n ]\n}\n[/block]\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your enterprise `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bitbucket:\\n client_id: \\\"key\\\"\\n client_secret: \\\"secret\\\"\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart\n\nRestart your Codecov Self-Hosted instance to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Bitbucket Server / Bitbucket Enterprise\"\n}\n[/block]\nBitbucket Server (BBS, formerly Stash) is a self-hosted instance of Bitbucket. Codecov Self-Hosted will need to communicate with your BBS to function properly. Please follow these configuration steps to setup your instance properly.\n\n## Step 1 - Create a new Application Link\n1. Create a unique **Consumer Key**, ex UUID: `a49d1f9e-294c-4cd6-a44c-e5e4440e67c9`\n2. Configure Application Link at `/plugins/servlet/applinks/listApplicationLinks`\n3. Enter the URL of your Codecov Self-Hosted instance (``) next to **Create a new link** button\n4. Fill in application details\n - Application Name: **Codecov**\n - Application Type: **Generic Application**\n - **Leave the remaining field empty.**\n5. Click **Continue*\n6. Now the link is added. Please click **Edit** on the Codecov link.\n7. Click on the tab **Incoming Authorization**\n8. Fill in the details:\n - **Consumer Key** with your generated client id.\n - **Consumer Name** with `Codecov`\n - **Public Key** (see below)\n - **Consumer Callback URL** with `/login/bitbucket_server`\n1. Click **Save**\n> You should now see Codecov in your Application Links\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9d2iMTFiXglyvHmp5ExoNK2X8nxJ+1mlxgWOyTUpTrOKRiDUbZoZID3TP8CobQ5BsqDOSawHyi+Waf9Ca+iYoTu1fa8yZUreQXAdaK1u61Mn2XCkmITE/N5kvbYjDEWA1Dwb6CsvVkYZXo/Eq1X/3yrLXWKDNEnm0Cq48PFWqMQIDAQAB\",\n \"language\": \"text\",\n \"name\": \"Bitbucket Server - Public Key\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/6dfd4d7-b6f02ea4-62cc-11e6-9205-92a55c3f5c96.gif\",\n \"b6f02ea4-62cc-11e6-9205-92a55c3f5c96.gif\",\n 978,\n 693,\n \"#e4e6e8\"\n ]\n }\n ]\n}\n[/block]\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your self-hosted `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bitbucket_server:\\n url: \\\"\\\"\\n client_id: \\\"Consumer Key from above\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart Codecov container\n\nRestart your Codecov Self-Hosted container to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitLab.com\"\n}\n[/block]\nGitLab.com follows the same install setup as GitLab CE/EE below. \n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitLab CE/EE\"\n}\n[/block]\nYour Gitlab Enterprise (CE/EE) (aka GLE) is a self-hosted instance of Gitlab. It's likely located behind your firewall. Codecov Self-Hosted will need to communicate with your GLE to function properly. Please follow these configuration steps to setup your instance properly.\n\n## Link your Gitlab Enterprise to Codecov Self-Hosted\nPlease replace `https://enterprise-hostname.com` with the root url of your GLE.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Using GitLab.com?\",\n \"body\": \"If you're using gitlab.com's hosted offering, you should use `https://gitlab.com` as your root url.\"\n}\n[/block]\n## Step 1 - Create a new application\n1. Create a new application at `https://enterprise-hostname.com/profile/applications`\n2. Fill in an Application Name, ex `Codecov Self-Hosted`\n3. Specify the redirect URI for your CE endpoint `https://codecov-enterprise-hostname.com/login/gitlab_enterprise`\n4. Select all scopes except `sudo`\n5. Click **Submit**\n - Store the **Application Id** and **Secret** for use in the configuration below\n\n\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your self-hosted `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"gitlab_enterprise:\\n url: \\\"https://enterprise-hostname.com\\\"\\n client_id: \\\"Application Id\\\"\\n client_secret: \\\"Secret\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart Codecov container\n\nRestart your Codecov Self-Hosted container to complete the integration.\n\n> Have a self-signed SSL certificate? Add your `ssl.pem` with [this documentation](https://docs.codecov.io/docs/set-up-oauth-login#include-sslpem-for-self-signed-ssl).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Include ssl.pem for self-signed SSL\"\n}\n[/block]\nTwo steps: (1) add the ssl pem location to your `codecov.yml`, (2) include it in your `docker run`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"gitlab_enterprise:\\n ssl_pem: \\\"/gle.ssl.pem\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker run -it --rm \\\\\\n -v \\\"$PWD/codecov.yml:/codecov.yml\\\" \\\\\\n -v \\\"$PWD/gle.ssl.pem:/gle.ssl.pem\\\" \\\\ # this is added\\n --link codecov-redis:redis \\\\\\n --link codecov-postgres:postgres \\\\\\n codecov/enterprise:v?.?.?\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","excerpt":"Via Github, Gitlab, or Bitbucket","isReference":false,"sync_unique":"","updates":["5fd78906b82783008208d8c5","60fa2b52b28409002a5cebf0","61162a4acc99ed0010dc87f1"],"version":"604a3fa3d6d5f0008027258e","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","method":"get"},"category":"604a3fa3d6d5f00080272535","githubsync":"","updatedAt":"2021-07-23T09:54:41.931Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"link-service-provider","slugUpdatedAt":"2020-12-11T21:14:44.525Z"},{"_id":"604a3fa3d6d5f0008027257f","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-05-17T21:43:29.937Z","createdAt":"2019-08-26T09:20:54.234Z","project":"57b33b5ec9a4551700b969a5","user":"5fb6f9444c67b600282c5169","category":"604a3fa3d6d5f00080272535","updates":["5d63f290bf38df001908e13c","5f5a7032e6696e002048f296"],"next":{"pages":[{"type":"doc","icon":"file-text-o","name":"Deploying with Docker Compose","slug":"deploying-with-docker","category":"Codecov Self-Hosted"}],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":2,"body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"For use with 4.4.8+\",\n \"body\": \"These deployment strategies assume you're installing v4.4.8 or later. Earlier versions of Codecov Self-Hosted need different considerations when deploying. \\n\\nPlease contact support@codecov.io if you are deploying an earlier version of Codecov Self-Hosted\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nBeing a containerized service, there are numerous strategies that can be utilized to deploy Codecov Self-Hosted successfully. How Codecov Self-Hosted is deployed ultimately depends on a combination of available resources, uptime needs, and planned usage. \n\nThis documentation is not intended to be an all-encompassing guide for deploying Codecov Self-Hosted. It should, however, serve to outline a few popular deployment strategies that can meet many common requirements of modern on-premises deployments.\n\nGenerally, deployment strategies fall along a spectrum of very easy to deploy but with low availability, to more challenging to deploy with high availability. Where a particular use case falls along this spectrum can be helpful in determine which deployment strategy should be used. \n\nUnlike other reference pages in this documentation, which can be fairly easily skimmed,** it is recommended to read this page in its entirety ** if you're considering a non-trivial deployment of Codecov Self-Hosted. \n[block:api-header]\n{\n \"title\": \"Deployment Types\"\n}\n[/block]\nThis document will outline three deployment strategies, one of each of the following types:\n\n* **Minimal Configuration, minimal availability** -- This is great for trial and proof of concept style deployments where an organization is still attempting to determine if Codecov is right for the organization's needs.\n* **Moderate Configuration, high availability** -- This is great for small to midsize deployments that prioritize high availability now, but not necessarily incredibly large scale. This deployment is right for an organization that has decided to use Codecov, wants to ensure high uptime to end users, and desires the ability to move to a larger scale deployment in the future with no data loss and minimal additional effort.\n* **High Configuration, high availability, high scale** -- This is great for deployments that have to scale to meet the needs of many users within extremely large organizations. This deployment strategy is the one employed by Codecov's SaaS offering: codecov.io. \n\nThe remainder of this document will outline each of these deployment types in detail, as well as provide any reference materials necessary for configuration and setup. \n[block:api-header]\n{\n \"title\": \"Deployment Strategy I: Minimal Configuration, Minimal Availability\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Trial Purposes Only\",\n \"body\": \"For all but the smallest of organizations, it is recommended to use this Deployment Strategy for trial purposes only.\"\n}\n[/block]\nThe most straightforward deployment is to deploy Codecov Self-Hosted on a single server using docker-compose with no external services. If your goal is simply to evaluate Codecov Self-Hosted, you have no internal requirement to preserve the data generated by Codecov, and plan to start fresh with a more robust deployment if you purchase Codecov; then this is the recommended Deployment Strategy. \n\nThe greatest benefit to this deployment is that a single engineer should be able to produce a usable version of Codecov Self-Hosted in two hours or less. Therefore, it's great for testing out the product.\n\nThis Deployment Strategy utilizes Docker volumes for persistence of the database, archive file/object storage, and caching. Therefore, loss of the underlying server would result in total data loss. For this reason, it is recommended to use this deployment only for the trial and proof of concept stage of using Codecov Self-Hosted. However, included with this documentation are recommended modifications to make the data generated by this deployment persistent. It is recommended to follow those instructions if you with to upgrade your deployment in the future without any potential data loss. \n\n## How to Deploy\n\nThe easiest way to use this Deployment Strategy is to follow the [Deploy with Docker Compose](https://docs.codecov.io/docs/deploying-with-docker) guide, and then move on to [Self Hosted Configuration](https://docs.codecov.io/docs/configuration).\n\n## Modifying to Use Cloud Services\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Using Cloud Services does not Guarantee Uptime\",\n \"body\": \"The below modification only ensures that data generated by Codecov Self-Hosted will persist past the lifetime of the server on which Codecov Self-Hosted is deployed. \\n\\nIf you require high availability / guarantees on uptime, please do not use this deployment.\"\n}\n[/block]\nThis Deployment Strategy can be modified to support smaller deployments and/or to provide data persistence. This is useful if you do not want to allocate a large amount of resources to the installation, or if you would prefer to maintain data generated a trial/proof of concept period in the event that your organization decides to deploy Codecov permanently. \n\nThe following modifications will guarantee data persistence in the event that Codecov Self-Hosted's underlying server fails. However, this deployment provides no high availability guarantee, and it is recommended to use a different deployment to support that use case. \n\nIt is possible to use this deployment with cloud services in order to guarantee data persistence in the event of a loss of the underlying server running Codecov Self-Hosted. To do this the implementer must:\n\n1. Create a Postgres 10 database in their cloud provider (e.g., RDS, Google Cloud SQL)\n2. Create a cloud storage bucket (e.g., using S3 or Google Cloud Storage) for uploaded report storage.\n3. Create a redis server for dedicated caching (e.g., using Elasticache)\n4. Update the codecov.yml to use these services.\n5. Remove the postgres and redis blocks from the docker-compose.yml\n\nExample configuration files are provided below. These files assume the user is deploying on a single EC2 instance in Amazon Web Services using GitHub as the repository provider:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n # Replace with the http location of your Codecov\\n # https://docs.codecov.io/docs/configuration#section-codecov-url\\n codecov_url: \\\"\\\"\\n codecov_api_url: \\\"\\\" #Codecov v4.6 and later\\n api_allowed_hosts: # Codecov version v4.6 and later\\n - \\\"\\\"\\n # Replace with your Codecov Self-Hosted Key\\n # https://docs.codecov.io/docs/configuration#section-enterprise-license\\n enterprise_license: \\\"\\\"\\n # Replace with a random string\\n # https://docs.codecov.io/docs/configuration#section-cookie-secret\\n http:\\n cookie_secret: \\\"\\\"\\ngithub:\\n client_id: \\\"\\\"\\n client_secret: \\\"\\\"\\n global_upload_token: \\\"\\\"\\nservices:\\n database_url: \\\"\\\"\\n redis_url: \\\"\\\"\\n minio:\\n host: s3.amazonaws.com\\n port: 443\\n bucket: \\n region: \\n verify_ssl: true\\n access_key_id: \\n secret_access_key: \\n #or\\n #iam_auth: true\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nNote that if you're using GCP with Google Cloud Storage, your `minio` block should read as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"#for GCS\\nservices:\\n minio:\\n host: storage.googleapis.com\\n port: 443\\n verify_ssl: true\\n bucket: \\n region: \\n access_key_id: \\n secret_access_key: \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nYou will need to do some additional work to setup Google Cloud Storage. You can find those instructions in [the v4.4.8 changelog](https://docs.codecov.io/changelog/release-notes-for-codecov-v448#section-setting-up-minio-with-google-cloud-storage) \n\nWith this configuration you can completely remove minio from your docker-compose.yml:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: \\\"3\\\"\\n\\nservices:\\n traefik:\\n image: traefik:v1.7-alpine\\n command:\\n - --api\\n - --docker\\n - --docker.watch\\n - --docker.constraints=tag==web\\n - --metrics\\n - --metrics.prometheus\\n\\n # NOTE: Toggle the lines below to enable SSL\\n - --entryPoints=Name:http Address::80 Compress::true\\n - --defaultEntryPoints=http\\n # - --entrypoints=Name:http Address::80 Redirect.EntryPoint:https Compress::true\\n # - --entryPoints=Name:https Address::443 TLS:/ssl/ssl.crt,/ssl/ssl.key Compress::true\\n # - --defaultentrypoints=http,https\\n\\n volumes:\\n - /var/run/docker.sock:/var/run/docker.sock:rw\\n - /dev/null:/traefik.toml:rw\\n # NOTE: Provide the SSL certs in the ./config folder below\\n # - ./config:/ssl\\n ports:\\n - \\\"80:80\\\"\\n - \\\"8080:8080\\\"\\n - \\\"443:443\\\"\\n networks:\\n - codecov\\n depends_on:\\n - web\\n web:\\n image: codecov/enterprise-web:v4.5.9 #or newer\\n command: web\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n ports:\\n - \\\"5000\\\"\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=web\\\"\\n - \\\"traefik.port=5000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /\\\"\\n environment:\\n - STATSD_HOST=statsd\\n - DATADOG_TRACE_ENABLED=false\\n networks:\\n - codecov\\n depends_on:\\n - statsd\\n\\n worker:\\n image: codecov/enterprise:v4.4.8 #or newer\\n command: worker\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n environment:\\n - STATSD_HOST=statsd\\n - DATADOG_TRACE_ENABLED=false\\n networks:\\n - codecov\\n depends_on:\\n - statsd\\n \\n statsd:\\n image: prom/statsd-exporter:v0.6.0\\n command: -statsd.listen-udp=:8125 -statsd.listen-tcp=:8125\\n ports:\\n - \\\"8125\\\"\\n - \\\"9102\\\"\\n networks:\\n - codecov\\n\\nnetworks:\\n codecov:\\n driver: bridge\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\nNote that the AWS Access Key and AWS Secret Key must be the identifying credentials for an IAM user that can specify the AWS bucket specified in the minio block of the above codecov.yml.\n\n## Scaling on a Single Server\n\nThanks to the use of Traefik, it is possible to scale both of codecov's services, the web and worker containers, on a single server. You should consider scaling this way if: \n\n* There is sufficient headroom on the underlying server\n* Report processing is lengthier than desired (e.g., status checks are taking longer than usual to complete on Pull Requests)\n* Web requests are taking longer than desired to complete (e.g., individual pages are taking awhile to load when viewing Codecov's web front end in the browser.)\n\nScaling is straightforward with: `docker-compose scale =`. For example, to add more workers: `docker-compose scale worker=3`. Since Traefik is used as a reverse proxy in this deployment, new web containers should be automatically detected and used. Worker containers communicate via Redis, and should automatically begin processing tasks after startup. \n\n## Erroneous Modifications\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"The Following Configuration Changes Should be Avoided\",\n \"body\": \"Despite outlining the modifications in detail, it is highly recommended to avoid performing the below steps. These modifications are described because they are both performed often by users who are new to Codecov Enterprise and guaranteed not to work without unknown quantities of additional effort.\"\n}\n[/block]\nGiven the simplicity of this deployment, it is tempting to do the following:\n\n1. Modify the docker-compose.yml and codecov.yml to use cloud services\n2. Spin up multiple EC2 instances using this configuration\n3. Put a load balancer in front of all the instances\n4. Proclaim that you have a high availability deployment. \n\nThis approach ** will not work**. The reason being that this Deployment Strategy handles its own proxying between http/https based services using Traefik. Traefik is used in this case because it provides enormous convenience when deploying scalable/multiple services on a single server. However, if you place an external load balancer in front of multiple servers each running Traefik, the reliability of the underlying services is not guaranteed. Unless you're comfortable modifying/removing Traefik, and supplying your own reverse proxying solution for the web and minio containers, it is not recommended to try the above modification.\n[block:api-header]\n{\n \"title\": \"Deployment Strategy II: Moderate Configuration, High availability\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"Suitable for Most Self-Hosted Users\",\n \"body\": \"This Deployment Strategy is the one generally recommended by Codecov. It strikes an acceptable balance between implementation difficulty, scalability, and availability.\"\n}\n[/block]\nThis Deployment Strategy is very similar to Deploy Strategy I with the cloud services modification. However, it also provides an additional high availability / uptime guarantee by running multiple copies of each Codecov Self-Hosted service and load balancing them. \n\nUse this Deployment Strategy if you require scalability, moderate ease of implementation and maintenance, and high availability to end users. This is the Deployment Strategy that is suitable for most Codecov Enterprise users. \n\nThe basic approach is the following:\n\n1. Decouple the services into the following: web and worker, minio; and deploy each on their own instance\n2. Place a load balancer in front of the instances running web and worker containers\n3. Optionally place a load balancer in front of the instances running minio. This is required if you intended to horizontally scale minio and/or require high availability of minio. \n4. Create the required cloud services, and update the codecov.yml to use those services.\n5. Modify docker-compose.yml.\n\nIn practical terms, you will need to create a single codecov.yml and two to three different docker-compose.yml's to support this deployment. \n\nAn example deployment in AWS would do the following:\n1. Create at least three EC2 instances: two for web and worker containers, one for minio. Though more can be created if desired.\n2. Create an Application Load Balancer for the web and worker containers. Optionally, one can be created for minio. \n3. Create RDS (postgres 10+), Elasticache (redis), and an S3 bucket for the deployment. \n4. Split the standard docker-compose.yml file into a web+worker file and a minio file and deploy them to the appropriate instances.\n\nExample configuration files are shown assuming a deployment into Amazon Web Services:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n # Replace with the http location of your Codecov\\n # https://docs.codecov.io/docs/configuration#section-codecov-url\\n codecov_url: \\\"\\\"\\n codecov_api_url: \\\"\\\" #Codecov v4.6 and later\\n api_allowed_hosts: # Codecov version v4.6 and later\\n - \\\"\\\"\\n # Replace with your Codecov Self-Hosted License key\\n # https://docs.codecov.io/docs/configuration#section-enterprise-license\\n enterprise_license: \\\"\\\"\\n # Replace with a random string\\n # https://docs.codecov.io/docs/configuration#section-cookie-secret\\n http:\\n cookie_secret: \\\"\\\"\\ngithub:\\n client_id: \\\"\\\"\\n client_secret: \\\"\\\"\\n global_upload_token: \\\"\\\"\\nservices:\\n database_url: \\\"\\\"\\n redis_url: \\\"\\\"\\n minio:\\n host: s3.amazonaws.com\\n port: 443\\n bucket: \\n region: \\n verify_ssl: true\\n access_key_id: \\n secret_access_key: \\n #or\\n #iam_auth: true\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThe web and worker containers can be merged into a single docker-compose.yml and deployed. Note that, most importantly, traefik has been removed:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: \\\"3\\\"\\n\\nservices:\\n web:\\n image: codecov/enterprise:v4.4.8 #or newer\\n command: web\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n ports:\\n - \\\"8000:5000\\\"\\n - \\\"80:5000\\\"\\n environment:\\n - STATSD_HOST=statsd\\n depends_on:\\n - statsd\\n restart: always\\n worker:\\n image: codecov/enterprise:v4.4.8 #or newer\\n command: worker\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n environment:\\n - STATSD_HOST=statsd\\n - DATADOG_TRACE_ENABLED=false\\n depends_on:\\n - statsd\\n statsd:\\n image: prom/statsd-exporter:v0.6.0\\n command: -statsd.listen-udp=:8125 -statsd.listen-tcp=:8125\\n ports:\\n - \\\"8125\\\"\\n - \\\"9102\\\"\",\n \"language\": \"yaml\",\n \"name\": \"web+worker_docker-compose.yml\"\n }\n ]\n}\n[/block]\nIf desired, you can split the web and worker docker-compose into separate docker-compose.yml files and deploy them separately. The worker does not require any sort of HTTP access to function properly, as it only communicates via Redis. \n[block:api-header]\n{\n \"title\": \"Deployment Strategy III: High Configuration, High Availability, High Scale\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Recommended for High Scale\",\n \"body\": \"The following deployment is a near replica of what is used for Codecov's SaaS offering: codecov.io. It is recommended when high availability and high scale are required, and maintainers don't mind taking on the additional burden of Kubernetes and Terraform.\"\n}\n[/block]\nThis Deployment Strategy is recommended for the most demanding of Codecov Self-Hosted deployments. It is managed using Terraform and requires Kubernetes. Codecov has provided an terraform configuration files supporting this deployment for all three major cloud providers: Azure, AWS, and Google Cloud Platform. Those resources and supporting documentation [can be found on GitHub](https://github.com/codecov/enterprise-resources) \n[block:api-header]\n{\n \"title\": \"A Note on System Requirements and Resource Needs\"\n}\n[/block]\nThere are two main components to consider when determining the performance of the underlying server(s) that will support Codecov Self-Hosted: Web traffic to the Codecov Self-Hosted frontend, Report processing demands.\n\nSince every organization is different, it's impossible to make hard and fast recommendations that will meet every deployment's needs.\n\nAs a general building block, Codecov uses Google's n1-standard-4 for deployment of web containers and the n1-standard-8 for deployment of worker containers (see: [Google Machine Types](https://cloud.google.com/compute/docs/machine-types)) . \n\nBy far the performance bottleneck on Codecov will be coverage report processing time. Therefore it's helpful to consider resource needs in terms of number of reports processed per minute. If your install will initially process 25 or less reports per minute (i.e., 25 or fewer commits running through a codecov enabled CI/CD per minute), it is recommended to deploy the equivalent of at least 1 n1-standard-8 for all infrastructure when using Deployment Strategy I; and 2 n1-standard-8's for web+worker (to provide high availability) and 1 n1-standard-4 for minio when using Deployment Strategy II. Once deployed, the performance of each instance can be monitored and scaled up or down as needed. \n\nThis is generally a good starting point, and is straightforward to scale horizontally when using Deployment Strategy II. If larger deployments are needed, the Codecov team is happy to provide more detailed recommendations depending on specific needs.\n\n[block:api-header]\n{\n \"title\": \"V4.6.X API container customization\"\n}\n[/block]\nThe web container proxies API traffic to the API container. If you wish to change the API container host or port you need to specify environment variable(s) on the web container.\n\n### Kubernetes\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"spec:\\n containers:\\n - image: codecov/enterprise-web:latest-stable\\n env:\\n - name: CODECOV_API_HOST\\n value: \\\"your-custom-name (default: api)\\\"\\n - name: CODECOV_API_PORT\\n value: \\\"your-custom-port (default: 8000)\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### Docker Compose\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"web:\\n image: codecov/enterprise-web:latest-stable\\n environment:\\n - \\\"CODECOV_API_HOST=your-custom-host (default: api)\\\"\\n - \\\"CODECOV_API_PORT=your-custom-port (default: 8000)\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]","excerpt":"This page outlines three types of Codecov Self-Hosted deployment that can be used to meet a wide variety of user needs.","slug":"codecov-enterprise-deployment-strategies","type":"basic","title":"Self-Hosted Deployment Strategies","__v":3,"parentDoc":"604a3fa3d6d5f0008027258b","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-09-09T21:50:40.870Z","deprecated":false},{"_id":"604a3fa3d6d5f0008027257b","order":3,"parentDoc":"604a3fa3d6d5f0008027258b","updates":["58ae19c57c8ab40f003d1531","606f757ee689f90062525cc0"],"user":"5b47e58599e0430003d8e823","version":"604a3fa3d6d5f0008027258e","__v":3,"link_external":false,"hidden":false,"project":"57b33b5ec9a4551700b969a5","title":"Deploying with Docker Compose","body":"[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Docker Compose is only meant for trialing Codecov Self-Hosted\",\n \"body\": \"Docker Compose is a helpful approach to initially trial an install of Codecov Self-Hosted\\n\\nHowever, for ongoing management of enterprise-grade implementations of Codecov Self-Hosted, we only recommend [using Terraform](https://github.com/codecov/enterprise-resources).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Installing\"\n}\n[/block]\nPlease follow the directions below to install Codecov.\n\n### Prerequisites \n\n- The system requirements range based on usage. \n - A minimum of 2GB RAM and 2 CPUs.\n- [Docker Engine](https://docs.docker.com/engine/installation/).\n- [Docker Compose](https://docs.docker.com/compose/install/).\n\n### Install and run Codecov Enterprise\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Download assets\\ncurl -fsSL https://raw.githubusercontent.com/codecov/enterprise/v4.6/general/codecov.yml > codecov.yml\\ncurl -fsSL https://raw.githubusercontent.com/codecov/enterprise/v4.6/general/docker-compose.yml > docker-compose.yml\\n\\n# Start Codecov Enterprise\\ndocker-compose up -d\",\n \"language\": \"shell\",\n \"name\": \"install.sh\"\n }\n ]\n}\n[/block]\nDon't forget to configure your `codecov.yml` by adding a trial key and a cookie secret.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Next Steps\",\n \"body\": \"- Get a **trial license key** by contacting [Codecov Self-Hosted Sales](https://codecov.io/self-hosted).\\n- Configure your setup via the `codecov.yml`. Learn more at [Configuration](doc:configuration).\\n\\nCodecov Self-Hosted will not run without a trial license key.\"\n}\n[/block]\nOnce you have setup your license key and modified the codecov.yml to add a unique cookie string, you may navigate to `localhost` or `http://127.0.0.1/` (or your `DOCKER_HOST` otherwise set in `/etc/hosts`) to see the UI of Codecov and begin setting up Oauth with your Git provider.\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Receiving following error?\",\n \"body\": \"ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?\\n\\n1. `service docker start`\\n2. Try sudo: `sudo docker-compose up -d`\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Logs\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# all logs\\ndocker-compose logs -f\\n# just web logs\\ndocker-compose logs -f web\",\n \"language\": \"shell\",\n \"name\": null\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Upgrading\"\n}\n[/block]\nTo upgrade Codecov, please follow the directions below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker-compose pull\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t # pull new version\\ndocker-compose stop web worker # stop old containers\\ndocker-compose rm -f web worker # remove old containers\\ndocker-compose up -d --no-deps web worker # start new containers\\ndocker-compose restart nginx \\t\\t\\t\\t\\t # restart nginx\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n- New versions are tagged [here](https://github.com/codecov/enterprise/releases).\n- The Docker `latest` version will be updated with stable releases, which may slightly lag tagged releases.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Restarting\"\n}\n[/block]\nIt is important to restart `nginx`, `web`, and `worker` when changing configuration.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker-compose restart web worker nginx\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nIf you change the `docker-compose.yml` you will need to down/up the services as demonstrated next.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker-compose down\\ndocker-compose up -d\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Scaling Nodes\"\n}\n[/block]\nComing soon.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Enable SSL\"\n}\n[/block]\nTo enable SSL, please follow the directions below.\n\n### Add SSL server in `nginx.conf`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \" ...other nginx.conf is above...\\n keepalive_timeout 65;\\n\\n # REMOVE OLD SERVER\\n # server {\\n # listen 80;\\n #\\n # location / {\\n # proxy_pass_header Server;\\n # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\\n # proxy_set_header X-Real-IP $remote_addr;\\n # proxy_set_header X-Scheme $scheme;\\n # proxy_set_header Host $http_host;\\n # proxy_redirect off;\\n # proxy_pass http://frontends;\\n # }\\n # }\\n\\n # ADD NEW SERVER FOR 80 and 443\\n server {\\n listen 80;\\n return 301 https://$host$request_uri;\\n client_max_body_size 0; # accept all file upload sizes\\n }\\n\\n server {\\n listen 443;\\n keepalive_timeout 5;\\n ssl on;\\n ssl_certificate /etc/nginx/codecov.crt;\\n ssl_certificate_key /etc/nginx/codecov.key;\\n ssl_session_cache shared:SSL:10m;\\n ssl_session_timeout 10m;\\n ssl_protocols TLSv1.2;\\n ssl_prefer_server_ciphers on;\\n ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM:!3DES;\\n client_max_body_size 0; # accept all file upload sizes\\n \\n location / {\\n proxy_pass_header Server;\\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\\n proxy_set_header X-Real-IP $remote_addr;\\n proxy_set_header X-Scheme $scheme;\\n proxy_set_header Host $http_host;\\n proxy_redirect off;\\n proxy_pass http://frontends;\\n }\\n }\\n}\\n\\n\",\n \"language\": \"text\",\n \"name\": \"nginx.conf\"\n }\n ]\n}\n[/block]\n### Include certificates in `docker-compose.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n nginx:\\n volumes:\\n - ./codecov.crt:/etc/nginx/codecov.crt:ro\\n - ./codecov.key:/etc/nginx/codecov.key:ro\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\nOnce you have adjusted both the `nginx.conf` and the `docker-compose.yml`, restart the system via `docker-compose down && docker-compose up -d`.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Report archiving\"\n}\n[/block]\nReport archiving is enabled by default. Codecov will store uploaded reports in their raw, unprocessed form. This can help debug coverage, and reduce vendor lock-in. \n\n#### Enabled\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n web:\\n volumes:\\n - archive-volume:/archive\\n worker:\\n volumes:\\n - archive-volume:/archive\\nvolumes:\\n archive-volume:\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\n#### Disabled\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n web:\\n volumes:\\n # - archive-volume:/archive\\n worker:\\n volumes:\\n # - archive-volume:/archive\\nvolumes:\\n # archive-volume:\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"The `archive` folder may get very large over time.\",\n \"body\": \"Depending on your usage, the `archive` folder may become very large. We recommend mounting a NFS drive that can scale with demand.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Adding SSL pem for your git provider\"\n}\n[/block]\nDo you have a self-signed certificate with your git service provider? Please follow these directions to include the cert.pem to enable ssl communication.\n\nProvide the certificate in the volume list when starting Codecov. It is **important** to name the file after the service provider listed in your configuration.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n web:\\n volumes:\\n - ./github_enterprise.pem:/config/github_enterprise.pem:ro\\n worker:\\n volumes:\\n - ./github_enterprise.pem:/config/github_enterprise.pem:ro\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Docker Single Container\",\n \"body\": \"Codecov does not provide support for Docker Single Container deployments\"\n}\n[/block]","category":"604a3fa3d6d5f00080272535","githubsync":"","next":{"pages":[{"type":"doc","icon":"file-text-o","name":"Other Install Notes and Updates","slug":"install-guide","category":"Codecov Self-Hosted"}],"description":""},"slug":"deploying-with-docker","createdAt":"2017-02-05T16:27:08.235Z","isReference":false,"link_url":"","sync_unique":"","type":"basic","api":{"auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"excerpt":"Using Codecov's official Docker image and docker-compose","updatedAt":"2021-04-08T21:49:47.904Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-12-11T17:46:21.082Z"},{"_id":"604a3fa3d6d5f00080272564","hidden":false,"link_url":"","order":4,"updates":["57b63d67e88dbf1900f37fc0","58ae176e7c8ab40f003d1529","5e5ecc87cc051900121e0676","5ef4d37f4e4ce20058f21424","5f92e5a5a5ea770011646e7f","5f9eada57f62f50011868639","5fd7873d207902003a8fe0ed","5fef4f3cfc0e200035ff2d67","5ff4942cb9077f02392132eb"],"createdAt":"2016-08-17T20:22:05.371Z","githubsync":"","next":{"description":"","pages":[]},"title":"Other Install Notes and Updates","type":"basic","category":"604a3fa3d6d5f00080272535","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"method":"get"},"body":"[block:api-header]\n{\n \"title\": \"Bare Metal and In-House Datacenter Deployments Deployments\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"As of January 22nd, 2019, we have deprecated support for Linux / bare metal.\",\n \"title\": \"Linux / bare metal deprecated\"\n}\n[/block]\nCodecov has deprecated bare metal deployment support. This is due to the underlying complexity these deployment approaches tend to possess compared to hosted cloud style deployments, and our inability to confidently support the myriad of different approaches that may come with deploying on bare metal.\n\nCodecov will support dockerized/containerized deployments that use cloud hosted services (e.g., AWS, GCP, Azure). By default, we will not support bare metal deployments, or on-premises deployments into a customer's own data center. but if your particular circumstances dictate such an approach, please reach out to us so we can discuss any potential ways forward. \n[block:api-header]\n{\n \"title\": \"Best Practice: Security\"\n}\n[/block]\nIn line with industry best practices, we recommend placing your self-hosted install of Codecov behind your company's firewall, or otherwise perform other access controls such that it is only accessible by trusted staff and employees. Other [Best Practices](doc:best-practices)\n[block:api-header]\n{\n \"title\": \"Codecov Self-Hosted Version Support\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Codecov Version v4.3.x and prior support deprecation\",\n \"body\": \"As of December 15, 2020, Codecov will no longer support installs of Codecov v4.3.x and prior.\"\n}\n[/block]\nCodecov will be deprecating support for installs of Codecov v4.3.x and prior as the product has appreciably changed to include updates like a newly refactored worker, support for features like Carryforward Flags, and better logging and error handling to quickly diagnose issues. Therefore, we can no longer guarantee the high standard of operability on Codecov versions prior to v4.3.x. \n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Upgrading from v4.3.x\",\n \"body\": \"Please note: if you are a customer on v4.3.x or prior, the upgrade will require a manual data migration so we would recommend a rolling migration by:\\n\\n1. Completing the new install of the latest version (this will require an additional license key, which Codecov can provide)\\n2. Updating your CI pipelines to upload coverage reports to both at once for projects currently on v4.3.x\\n3. Any new projects can be uploaded to the new install directly\\n\\nPlease reach out to the Codecov team directly at `success@codecov.io` for additional documentation.\"\n}\n[/block]","excerpt":"","isReference":false,"link_external":false,"parentDoc":"604a3fa3d6d5f0008027258b","slug":"install-guide","__v":10,"user":"5b47e58599e0430003d8e823","sync_unique":"","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","updatedAt":"2021-01-15T21:07:41.967Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-22T18:48:42.544Z"}],"childrenPages":[{"_id":"604a3fa3d6d5f00080272567","isReference":false,"next":{"pages":[{"type":"doc","icon":"file-text-o","name":"Set Up Oauth Login (Self-Hosted)","slug":"set-up-oauth-login","category":"Codecov Self-Hosted"}],"description":""},"order":0,"__v":8,"body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Overview\"\n}\n[/block]\nCodecov configuration is done through a yaml file or environment variables.\n\nThe environment variables must be in the format of `CATEGORY__KEY=\"VALUE\"`, note the two underscores between category and key.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n codecov_url: \\\"value\\\"\\n codecov_api_url: \\\"value\\\" # Codecov version v4.6 and later\\n api_allowed_hosts: # Codecov version v4.6 and later\\n - \\\"value\\\"\\nservices:\\n notifications:\\n slack: \\\"value\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIf using environment variables, would become:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"export SETUP__CODECOV_URL=\\\"value\\\"\\nexport SETUP__CODECOV_API_URL=\\\"value\\\" # Codecov version v4.6 and later\\nexport SERVICES__NOTIFICATIONS__SLACK=\\\"value\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Enterprise License\"\n}\n[/block]\nProvided by Codecov staff which is unique to each company. [You can request a license key here.](https://about.codecov.io/self-hosted/) \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n enterprise_license: \\\"very-long-license-key\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Codecov URL\"\n}\n[/block]\nThe base url of your Codecov Enterprise instance\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Do not add a trailing slash\",\n \"body\": \"If you are encountering errors on uploads, or clicking links in statuses or comments, confirm you did not add a trailing slack at the end of this value.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n codecov_url: \\\"https://codecov.your-company.com\\\"\\n codecov_api_url: \\\"https://codecov.your-company.com\\\" #needed in Codecov version v4.6 and later\\n\\n# or you may use an IP address with an optional port\\nsetup:\\n codecov_url: \\\"http://192.168.1.1:5000\\\"\\n codecov_api_url: \\\"http://192.168.1.1:5000\\\" #needed in Codecov version v4.6 and later\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThis url is used, primarily, in [Commit Status](doc:commit-status), [Pull Request Comments](docs:pull-request-comments) and [Notifications](doc:notifications) as the redirect url to get back to your Codecov.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Add custom CI domains\"\n}\n[/block]\nAn important part of Codecov's process is to check the CI status of commits in order to ensure coverage data is complete and generated by a successful CI build. Add you CI domains in the configuration to ensure they are properly detected.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n ci_providers:\\n - jenkins.mydomain.com # domain name only\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Guest Access\"\n}\n[/block]\n*By default*: all users (logged in or guests) can view reports for **public repositories** hosted on Github/Bitbucket/Gitlab (not their respective Enterprise products).\nYou may disable guest access which will require all users to login to your Enterprise instance in order to view any project or interact with the product at all.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n guest_access: off\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Cookie Secret\"\n}\n[/block]\n\nString used to encrypt secure cookies with. If changed user sessions will exprie and require login to access system again.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n http:\\n cookie_secret: \\\"some-random-string\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n> Previously at `setup.cookie_secret` which is automatically copied under `http` node.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Database\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n database_url: postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB_NAME}\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThe full regular expression the url gets parsed through is the following:\n```\npostgres://([\\w\\-]*):?([\\w\\-]*)@([\\w\\-\\.]+):?(\\d+)/?([\\w\\-]+)\n```\n\nThe regular expression for the user and password is `[\\w\\-]*`, some random-generated passwords contain commas and other characters. Please change the password, if necessary, to fit the regular expression above.\n\nTest your string against this regular expression in `bash` via:\n\n```sh\necho \"insert-string-here\" | python -c \"import sys, re;print('Passed' if re.match('postgres://([\\w\\-]*):?([\\w\\-]*)@([\\w\\-\\.]+):?(\\d+)/?([\\w\\-]+)', sys.stdin.read()) else 'Failed');\"\n```\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Redis\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Redis Cluster Mode is not supported\",\n \"body\": \"Due to a lack of cluster mode support in the underlying message queuing system we use, Codecov can not support clustered Redis at this time.\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Encryption in transit not supported\",\n \"body\": \"Currently accessing Redis via TLS is not supported.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n redis_url: redis://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB_NAME}\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\nYour Redis instance is used to quickly upload reports for queueing. The instance size of Redis can vary based on (a) size of coverage reports, (b) frequency of uploads, and (c) number of workers processing reports. Recommended 1GB or larger.\n\nThe full regular expression is:\n```\nredis://([\\w\\-]*)?:?([\\w\\-]*)?@?([\\w\\-\\.]+):?(\\d+)/?([\\w\\-]+)\n```\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Restrict HTTP Connections\"\n}\n[/block]\nYou may restrict the domains that [Notifications](doc:notifications) can connect to.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n notifications:\\n slack: \\\"myteam.slack.com\\\" # can only send messages to myteam.slack.com\\n gitter: off \\t\\t\\t\\t\\t\\t # disable gitter notifications\\n webhook: \\\"domain.com\\\" # webhooks can only be sent to domain.com\\n irc: off \\t\\t\\t\\t\\t\\t\\t \\t\\t # disable irc\\n hipchat: off \\t\\t\\t\\t\\t # disable hipchat\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Global Upload Tokens\"\n}\n[/block]\nEach Linked Service Provider may have a **Global Upload Token** to simplify the upload process. To specify your upload token please append a unique string to your service provider.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_enterprise:\\n global_upload_token: \\\"ghe-123abc\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"body\": \"When you upload using the global token, you **must** include the global token **AND** the `owner/repo` slug to accept uploads. One option is to supply `-r` argument, you may also provide this setting in the `codecov.yml` file.\\n\\nNot providing the slug of the repo will result in 4xx errors.\",\n \"title\": \"Global Token Upload Settings\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bash <(curl -s https://mycodecov.company.com/bash) -t \\\"ghe-123abc\\\" -r owner/repo\",\n \"language\": \"shell\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Restrict Organizations\"\n}\n[/block]\nYou may restrict users to require membership to at least one team/organization.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github:\\n organizations:\\n - \\\"awesome-team\\\"\\n - \\\"modest_mice\\\"\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nAny user who attempt to login **must** be a member of either `awesome-team` or `modest_mice`. This configuration works for GitHub, Bitbucket and GitLab service providers.\n[block:api-header]\n{\n \"title\": \"Restrict Teams (GitHub Only)\"\n}\n[/block]\nAs of Codecov Enterprise 4.4.6, GitHub and GitHub Enterprise users can restrict login based on organization *and* team if desired. Team based restrictions will only work if the organization is defined. Otherwise the team list is ignored. Note that both team and organization lists are case sensitive.\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_enterprise:\\n organizations:\\n - \\\"Great Company\\\"\\n teams:\\n - \\\"My Great Team\\\"\\n \\n# The following WILL NOT work. Organizations must be supplied as well.\\ngithub_enterprise:\\n teams:\\n - \\\"My Great Team\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Team Restriction Exists for GitHub and GitHub Enterprise Only\",\n \"body\": \"Currently only GitHub and GitHub Enterprise users can use team-based restrictions. \\n\\nDefining a `teams` block for any other repository provider in your codecov.yml will likely cause yaml validation to fail.\"\n}\n[/block]\nNote that organization and team checking is inclusive. For example, if you specify multiple organizations and multiple teams, this check will pass if the user belongs to any of the listed organizations *and* any of the listed teams.","category":"604a3fa3d6d5f00080272535","link_external":false,"slug":"configuration","user":"5b47e58599e0430003d8e823","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"method":"get"},"createdAt":"2016-08-18T11:30:00.113Z","hidden":false,"link_url":"","parentDoc":"604a3fa3d6d5f0008027258b","type":"basic","updates":["5bf154ffd9399700313d957a","5fbf0a64e76078003a59ed8b","6026e58da317d6001e6c5aa7","60a80b1a32c95c0019793bc9"],"version":"604a3fa3d6d5f0008027258e","excerpt":"","githubsync":"","project":"57b33b5ec9a4551700b969a5","sync_unique":"","title":"Self-Hosted Configuration","updatedAt":"2022-03-09T21:00:11.036Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-11-25T22:05:11.811Z"},{"_id":"604a3fa3d6d5f00080272566","title":"Set Up Oauth Login (Self-Hosted)","type":"basic","__v":5,"link_url":"","order":1,"parentDoc":"604a3fa3d6d5f0008027258b","project":"57b33b5ec9a4551700b969a5","slug":"set-up-oauth-login","createdAt":"2016-08-18T11:07:35.430Z","hidden":false,"link_external":false,"next":{"description":"","pages":[{"type":"doc","icon":"file-text-o","name":"Self-Hosted Deployment Strategies","slug":"codecov-enterprise-deployment-strategies","category":"Codecov Self-Hosted"}]},"user":"5b47e58599e0430003d8e823","body":"A service provider is the product you use to host your source code. Codecov integrates with GitHub, Github Enterprise, Bitbucket, Bitbucket Server (formally Stash), GitLab and GitLab Enterprise. \n\nPlease choose one or more provider to link with your Codecov Enterprise via Oauth login. This step is mandatory for setup. \n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Do not indent your service provider configuration\",\n \"body\": \"A common configuration error is to indent the service provider configuration under the setup block in your codecov.yml. This will result in errors when running codecov enterprise. \\n\\nWhen adding service providers, be sure to add them to the codecov.yml as follows:\\n\\n``` \\nsetup:\\n # various setup configs\\ngithub_enterprise:\\n # provider config\\n```\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Are you using Github.com or Github Enterprise?\",\n \"body\": \"In addition to setting up the Oauth login below (which is mandatory), it is strongly recommended to use the [Github App Integration for Codecov Self-Hosted](doc:how-to-create-a-github-app-for-codecov-enterprise)\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitHub.com\"\n}\n[/block]\nBelow is the guide to link **Github.com** to your Codecov Self-Hosted.\n\n## Step 1 - Create a new application\n1. Create a new application at `https://github.com/settings/applications/new`\n2. Fill in an Application Name, ex `Codecov Enterprise`\n3. (optional) Upload [Codecov avatar](https://avatars2.githubusercontent.com/u/8226205?v=3&s=200)\n4. Specify Homepage URL to your CE endpoint `https://codecov-enterprise-hostname.com`\n5. Specify the Authorization Callback URL `https://codecov-enterprise-hostname.com/login/github`\n6. Click **Register Application**\n - Store the **Client ID** and **Client Secret** for use in the configuration below\n\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your self-hosted `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github:\\n client_id: \\\"Client ID\\\"\\n client_secret: \\\"Client Secret\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart\n\nRestart your Codecov Self-Hosted to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitHub Enterprise\"\n}\n[/block]\nYour Github Enterprise (GHE) is a self-hosted instance of Github. It likely located behind your firewall. Codecov Self-Hosted will need to communicate with your GHE to function properly. Please follow these configuration steps to setup your instance properly.\n\nPlease replace `https://enterprise-hostname.com` with the root url of your GHE.\n\n## Step 1 - Create a new application\n1. Create a new application at `https://enterprise-hostname.com/settings/applications/new`\n2. Fill in an Application Name, ex `Codecov Self-Hosted`\n3. (optional) Upload [Codecov avatar](https://avatars2.githubusercontent.com/u/8226205?v=3&s=200)\n4. Specify Homepage URL to your Codecov Self-Hosted endpoint `https://codecov-enterprise-hostname.com`\n5. Specify the Authorization Callback URL `https://codecov-enterprise-hostname.com/login/ghe`\n6. Click **Register Application**\n - Store the **Client ID** and **Client Secret** for use in the configuration below\n\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your enterprise `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github_enterprise:\\n url: \\\"https://enterprise-hostname.com\\\"\\n api_url: \\\"https://enterprise-hostname.com/api/v3\\\"\\n client_id: \\\"Client ID\\\"\\n client_secret: \\\"Client Secret\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart\n\nRestart your Codecov Self-Hosted instance to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Bitbucket.org\"\n}\n[/block]\nBelow is the guide to link **Github.com** to your Codecov Self-Hosted Instance.\n\n## Step 1 - Add OAuth consumer\n1. Create a new OAuth consumer\n - Goto `https://bitbucket.org/account/user/USERNAME/oauth-consumers/new`\n - Replace `USERNAME` with your username or team name above\n - You may review [Bitbucket's guide](https://confluence.atlassian.com/bitbucket/integrate-another-application-through-oauth-372605388.html) too\n2. Fill in an Application Name, ex `Codecov Self-Hosted`\n3. Fill in an Callback URL to `http://codecov.domain.com/login/bitbucket`\n4. Fill in an URL to `http://codecov.domain.com/bb`\n5. Toggle the permissions as seen in the image below.\n6. Click **Save**\n7. In your list of **OAuth Consumers** click on your new entry.\n - Copy the **Key** and **Secret** for your codecov.yml\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/047a83b-Screen_Shot_2016-08-23_at_10.45.03_AM.png\",\n \"Screen Shot 2016-08-23 at 10.45.03 AM.png\",\n 1234,\n 668,\n \"#7f7f7f\"\n ]\n }\n ]\n}\n[/block]\nIn addition, this box must be checked in order for BitBucket to share the credentials back to Codecov.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b08a564-f322c7d4-c089-4cfd-a881-9eeac49b2190.png\",\n \"f322c7d4-c089-4cfd-a881-9eeac49b2190.png\",\n 671,\n 108,\n \"#f8f9fa\"\n ]\n }\n ]\n}\n[/block]\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your enterprise `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bitbucket:\\n client_id: \\\"key\\\"\\n client_secret: \\\"secret\\\"\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart\n\nRestart your Codecov Self-Hosted instance to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Bitbucket Server / Bitbucket Enterprise\"\n}\n[/block]\nBitbucket Server (BBS, formerly Stash) is a self-hosted instance of Bitbucket. Codecov Self-Hosted will need to communicate with your BBS to function properly. Please follow these configuration steps to setup your instance properly.\n\n## Step 1 - Create a new Application Link\n1. Create a unique **Consumer Key**, ex UUID: `a49d1f9e-294c-4cd6-a44c-e5e4440e67c9`\n2. Configure Application Link at `/plugins/servlet/applinks/listApplicationLinks`\n3. Enter the URL of your Codecov Self-Hosted instance (``) next to **Create a new link** button\n4. Fill in application details\n - Application Name: **Codecov**\n - Application Type: **Generic Application**\n - **Leave the remaining field empty.**\n5. Click **Continue*\n6. Now the link is added. Please click **Edit** on the Codecov link.\n7. Click on the tab **Incoming Authorization**\n8. Fill in the details:\n - **Consumer Key** with your generated client id.\n - **Consumer Name** with `Codecov`\n - **Public Key** (see below)\n - **Consumer Callback URL** with `/login/bitbucket_server`\n1. Click **Save**\n> You should now see Codecov in your Application Links\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9d2iMTFiXglyvHmp5ExoNK2X8nxJ+1mlxgWOyTUpTrOKRiDUbZoZID3TP8CobQ5BsqDOSawHyi+Waf9Ca+iYoTu1fa8yZUreQXAdaK1u61Mn2XCkmITE/N5kvbYjDEWA1Dwb6CsvVkYZXo/Eq1X/3yrLXWKDNEnm0Cq48PFWqMQIDAQAB\",\n \"language\": \"text\",\n \"name\": \"Bitbucket Server - Public Key\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/6dfd4d7-b6f02ea4-62cc-11e6-9205-92a55c3f5c96.gif\",\n \"b6f02ea4-62cc-11e6-9205-92a55c3f5c96.gif\",\n 978,\n 693,\n \"#e4e6e8\"\n ]\n }\n ]\n}\n[/block]\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your self-hosted `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"bitbucket_server:\\n url: \\\"\\\"\\n client_id: \\\"Consumer Key from above\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart Codecov container\n\nRestart your Codecov Self-Hosted container to complete the integration.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitLab.com\"\n}\n[/block]\nGitLab.com follows the same install setup as GitLab CE/EE below. \n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"GitLab CE/EE\"\n}\n[/block]\nYour Gitlab Enterprise (CE/EE) (aka GLE) is a self-hosted instance of Gitlab. It's likely located behind your firewall. Codecov Self-Hosted will need to communicate with your GLE to function properly. Please follow these configuration steps to setup your instance properly.\n\n## Link your Gitlab Enterprise to Codecov Self-Hosted\nPlease replace `https://enterprise-hostname.com` with the root url of your GLE.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Using GitLab.com?\",\n \"body\": \"If you're using gitlab.com's hosted offering, you should use `https://gitlab.com` as your root url.\"\n}\n[/block]\n## Step 1 - Create a new application\n1. Create a new application at `https://enterprise-hostname.com/profile/applications`\n2. Fill in an Application Name, ex `Codecov Self-Hosted`\n3. Specify the redirect URI for your CE endpoint `https://codecov-enterprise-hostname.com/login/gitlab_enterprise`\n4. Select all scopes except `sudo`\n5. Click **Submit**\n - Store the **Application Id** and **Secret** for use in the configuration below\n\n\n## Step 2 - Configuration\n\nAppend the information collected in step 1 in your self-hosted `codecov.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"gitlab_enterprise:\\n url: \\\"https://enterprise-hostname.com\\\"\\n client_id: \\\"Application Id\\\"\\n client_secret: \\\"Secret\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n## Step 3 - Restart Codecov container\n\nRestart your Codecov Self-Hosted container to complete the integration.\n\n> Have a self-signed SSL certificate? Add your `ssl.pem` with [this documentation](https://docs.codecov.io/docs/set-up-oauth-login#include-sslpem-for-self-signed-ssl).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Include ssl.pem for self-signed SSL\"\n}\n[/block]\nTwo steps: (1) add the ssl pem location to your `codecov.yml`, (2) include it in your `docker run`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"gitlab_enterprise:\\n ssl_pem: \\\"/gle.ssl.pem\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker run -it --rm \\\\\\n -v \\\"$PWD/codecov.yml:/codecov.yml\\\" \\\\\\n -v \\\"$PWD/gle.ssl.pem:/gle.ssl.pem\\\" \\\\ # this is added\\n --link codecov-redis:redis \\\\\\n --link codecov-postgres:postgres \\\\\\n codecov/enterprise:v?.?.?\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","excerpt":"Via Github, Gitlab, or Bitbucket","isReference":false,"sync_unique":"","updates":["5fd78906b82783008208d8c5","60fa2b52b28409002a5cebf0","61162a4acc99ed0010dc87f1"],"version":"604a3fa3d6d5f0008027258e","api":{"url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","method":"get"},"category":"604a3fa3d6d5f00080272535","githubsync":"","updatedAt":"2021-07-23T09:54:41.931Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"link-service-provider","slugUpdatedAt":"2020-12-11T21:14:44.525Z"},{"_id":"604a3fa3d6d5f0008027257f","version":"604a3fa3d6d5f0008027258e","updatedAt":"2022-05-17T21:43:29.937Z","createdAt":"2019-08-26T09:20:54.234Z","project":"57b33b5ec9a4551700b969a5","user":"5fb6f9444c67b600282c5169","category":"604a3fa3d6d5f00080272535","updates":["5d63f290bf38df001908e13c","5f5a7032e6696e002048f296"],"next":{"pages":[{"type":"doc","icon":"file-text-o","name":"Deploying with Docker Compose","slug":"deploying-with-docker","category":"Codecov Self-Hosted"}],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":2,"body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"For use with 4.4.8+\",\n \"body\": \"These deployment strategies assume you're installing v4.4.8 or later. Earlier versions of Codecov Self-Hosted need different considerations when deploying. \\n\\nPlease contact support@codecov.io if you are deploying an earlier version of Codecov Self-Hosted\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nBeing a containerized service, there are numerous strategies that can be utilized to deploy Codecov Self-Hosted successfully. How Codecov Self-Hosted is deployed ultimately depends on a combination of available resources, uptime needs, and planned usage. \n\nThis documentation is not intended to be an all-encompassing guide for deploying Codecov Self-Hosted. It should, however, serve to outline a few popular deployment strategies that can meet many common requirements of modern on-premises deployments.\n\nGenerally, deployment strategies fall along a spectrum of very easy to deploy but with low availability, to more challenging to deploy with high availability. Where a particular use case falls along this spectrum can be helpful in determine which deployment strategy should be used. \n\nUnlike other reference pages in this documentation, which can be fairly easily skimmed,** it is recommended to read this page in its entirety ** if you're considering a non-trivial deployment of Codecov Self-Hosted. \n[block:api-header]\n{\n \"title\": \"Deployment Types\"\n}\n[/block]\nThis document will outline three deployment strategies, one of each of the following types:\n\n* **Minimal Configuration, minimal availability** -- This is great for trial and proof of concept style deployments where an organization is still attempting to determine if Codecov is right for the organization's needs.\n* **Moderate Configuration, high availability** -- This is great for small to midsize deployments that prioritize high availability now, but not necessarily incredibly large scale. This deployment is right for an organization that has decided to use Codecov, wants to ensure high uptime to end users, and desires the ability to move to a larger scale deployment in the future with no data loss and minimal additional effort.\n* **High Configuration, high availability, high scale** -- This is great for deployments that have to scale to meet the needs of many users within extremely large organizations. This deployment strategy is the one employed by Codecov's SaaS offering: codecov.io. \n\nThe remainder of this document will outline each of these deployment types in detail, as well as provide any reference materials necessary for configuration and setup. \n[block:api-header]\n{\n \"title\": \"Deployment Strategy I: Minimal Configuration, Minimal Availability\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Trial Purposes Only\",\n \"body\": \"For all but the smallest of organizations, it is recommended to use this Deployment Strategy for trial purposes only.\"\n}\n[/block]\nThe most straightforward deployment is to deploy Codecov Self-Hosted on a single server using docker-compose with no external services. If your goal is simply to evaluate Codecov Self-Hosted, you have no internal requirement to preserve the data generated by Codecov, and plan to start fresh with a more robust deployment if you purchase Codecov; then this is the recommended Deployment Strategy. \n\nThe greatest benefit to this deployment is that a single engineer should be able to produce a usable version of Codecov Self-Hosted in two hours or less. Therefore, it's great for testing out the product.\n\nThis Deployment Strategy utilizes Docker volumes for persistence of the database, archive file/object storage, and caching. Therefore, loss of the underlying server would result in total data loss. For this reason, it is recommended to use this deployment only for the trial and proof of concept stage of using Codecov Self-Hosted. However, included with this documentation are recommended modifications to make the data generated by this deployment persistent. It is recommended to follow those instructions if you with to upgrade your deployment in the future without any potential data loss. \n\n## How to Deploy\n\nThe easiest way to use this Deployment Strategy is to follow the [Deploy with Docker Compose](https://docs.codecov.io/docs/deploying-with-docker) guide, and then move on to [Self Hosted Configuration](https://docs.codecov.io/docs/configuration).\n\n## Modifying to Use Cloud Services\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Using Cloud Services does not Guarantee Uptime\",\n \"body\": \"The below modification only ensures that data generated by Codecov Self-Hosted will persist past the lifetime of the server on which Codecov Self-Hosted is deployed. \\n\\nIf you require high availability / guarantees on uptime, please do not use this deployment.\"\n}\n[/block]\nThis Deployment Strategy can be modified to support smaller deployments and/or to provide data persistence. This is useful if you do not want to allocate a large amount of resources to the installation, or if you would prefer to maintain data generated a trial/proof of concept period in the event that your organization decides to deploy Codecov permanently. \n\nThe following modifications will guarantee data persistence in the event that Codecov Self-Hosted's underlying server fails. However, this deployment provides no high availability guarantee, and it is recommended to use a different deployment to support that use case. \n\nIt is possible to use this deployment with cloud services in order to guarantee data persistence in the event of a loss of the underlying server running Codecov Self-Hosted. To do this the implementer must:\n\n1. Create a Postgres 10 database in their cloud provider (e.g., RDS, Google Cloud SQL)\n2. Create a cloud storage bucket (e.g., using S3 or Google Cloud Storage) for uploaded report storage.\n3. Create a redis server for dedicated caching (e.g., using Elasticache)\n4. Update the codecov.yml to use these services.\n5. Remove the postgres and redis blocks from the docker-compose.yml\n\nExample configuration files are provided below. These files assume the user is deploying on a single EC2 instance in Amazon Web Services using GitHub as the repository provider:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n # Replace with the http location of your Codecov\\n # https://docs.codecov.io/docs/configuration#section-codecov-url\\n codecov_url: \\\"\\\"\\n codecov_api_url: \\\"\\\" #Codecov v4.6 and later\\n api_allowed_hosts: # Codecov version v4.6 and later\\n - \\\"\\\"\\n # Replace with your Codecov Self-Hosted Key\\n # https://docs.codecov.io/docs/configuration#section-enterprise-license\\n enterprise_license: \\\"\\\"\\n # Replace with a random string\\n # https://docs.codecov.io/docs/configuration#section-cookie-secret\\n http:\\n cookie_secret: \\\"\\\"\\ngithub:\\n client_id: \\\"\\\"\\n client_secret: \\\"\\\"\\n global_upload_token: \\\"\\\"\\nservices:\\n database_url: \\\"\\\"\\n redis_url: \\\"\\\"\\n minio:\\n host: s3.amazonaws.com\\n port: 443\\n bucket: \\n region: \\n verify_ssl: true\\n access_key_id: \\n secret_access_key: \\n #or\\n #iam_auth: true\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nNote that if you're using GCP with Google Cloud Storage, your `minio` block should read as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"#for GCS\\nservices:\\n minio:\\n host: storage.googleapis.com\\n port: 443\\n verify_ssl: true\\n bucket: \\n region: \\n access_key_id: \\n secret_access_key: \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nYou will need to do some additional work to setup Google Cloud Storage. You can find those instructions in [the v4.4.8 changelog](https://docs.codecov.io/changelog/release-notes-for-codecov-v448#section-setting-up-minio-with-google-cloud-storage) \n\nWith this configuration you can completely remove minio from your docker-compose.yml:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: \\\"3\\\"\\n\\nservices:\\n traefik:\\n image: traefik:v1.7-alpine\\n command:\\n - --api\\n - --docker\\n - --docker.watch\\n - --docker.constraints=tag==web\\n - --metrics\\n - --metrics.prometheus\\n\\n # NOTE: Toggle the lines below to enable SSL\\n - --entryPoints=Name:http Address::80 Compress::true\\n - --defaultEntryPoints=http\\n # - --entrypoints=Name:http Address::80 Redirect.EntryPoint:https Compress::true\\n # - --entryPoints=Name:https Address::443 TLS:/ssl/ssl.crt,/ssl/ssl.key Compress::true\\n # - --defaultentrypoints=http,https\\n\\n volumes:\\n - /var/run/docker.sock:/var/run/docker.sock:rw\\n - /dev/null:/traefik.toml:rw\\n # NOTE: Provide the SSL certs in the ./config folder below\\n # - ./config:/ssl\\n ports:\\n - \\\"80:80\\\"\\n - \\\"8080:8080\\\"\\n - \\\"443:443\\\"\\n networks:\\n - codecov\\n depends_on:\\n - web\\n web:\\n image: codecov/enterprise-web:v4.5.9 #or newer\\n command: web\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n ports:\\n - \\\"5000\\\"\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=web\\\"\\n - \\\"traefik.port=5000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /\\\"\\n environment:\\n - STATSD_HOST=statsd\\n - DATADOG_TRACE_ENABLED=false\\n networks:\\n - codecov\\n depends_on:\\n - statsd\\n\\n worker:\\n image: codecov/enterprise:v4.4.8 #or newer\\n command: worker\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n environment:\\n - STATSD_HOST=statsd\\n - DATADOG_TRACE_ENABLED=false\\n networks:\\n - codecov\\n depends_on:\\n - statsd\\n \\n statsd:\\n image: prom/statsd-exporter:v0.6.0\\n command: -statsd.listen-udp=:8125 -statsd.listen-tcp=:8125\\n ports:\\n - \\\"8125\\\"\\n - \\\"9102\\\"\\n networks:\\n - codecov\\n\\nnetworks:\\n codecov:\\n driver: bridge\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\nNote that the AWS Access Key and AWS Secret Key must be the identifying credentials for an IAM user that can specify the AWS bucket specified in the minio block of the above codecov.yml.\n\n## Scaling on a Single Server\n\nThanks to the use of Traefik, it is possible to scale both of codecov's services, the web and worker containers, on a single server. You should consider scaling this way if: \n\n* There is sufficient headroom on the underlying server\n* Report processing is lengthier than desired (e.g., status checks are taking longer than usual to complete on Pull Requests)\n* Web requests are taking longer than desired to complete (e.g., individual pages are taking awhile to load when viewing Codecov's web front end in the browser.)\n\nScaling is straightforward with: `docker-compose scale =`. For example, to add more workers: `docker-compose scale worker=3`. Since Traefik is used as a reverse proxy in this deployment, new web containers should be automatically detected and used. Worker containers communicate via Redis, and should automatically begin processing tasks after startup. \n\n## Erroneous Modifications\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"The Following Configuration Changes Should be Avoided\",\n \"body\": \"Despite outlining the modifications in detail, it is highly recommended to avoid performing the below steps. These modifications are described because they are both performed often by users who are new to Codecov Enterprise and guaranteed not to work without unknown quantities of additional effort.\"\n}\n[/block]\nGiven the simplicity of this deployment, it is tempting to do the following:\n\n1. Modify the docker-compose.yml and codecov.yml to use cloud services\n2. Spin up multiple EC2 instances using this configuration\n3. Put a load balancer in front of all the instances\n4. Proclaim that you have a high availability deployment. \n\nThis approach ** will not work**. The reason being that this Deployment Strategy handles its own proxying between http/https based services using Traefik. Traefik is used in this case because it provides enormous convenience when deploying scalable/multiple services on a single server. However, if you place an external load balancer in front of multiple servers each running Traefik, the reliability of the underlying services is not guaranteed. Unless you're comfortable modifying/removing Traefik, and supplying your own reverse proxying solution for the web and minio containers, it is not recommended to try the above modification.\n[block:api-header]\n{\n \"title\": \"Deployment Strategy II: Moderate Configuration, High availability\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"Suitable for Most Self-Hosted Users\",\n \"body\": \"This Deployment Strategy is the one generally recommended by Codecov. It strikes an acceptable balance between implementation difficulty, scalability, and availability.\"\n}\n[/block]\nThis Deployment Strategy is very similar to Deploy Strategy I with the cloud services modification. However, it also provides an additional high availability / uptime guarantee by running multiple copies of each Codecov Self-Hosted service and load balancing them. \n\nUse this Deployment Strategy if you require scalability, moderate ease of implementation and maintenance, and high availability to end users. This is the Deployment Strategy that is suitable for most Codecov Enterprise users. \n\nThe basic approach is the following:\n\n1. Decouple the services into the following: web and worker, minio; and deploy each on their own instance\n2. Place a load balancer in front of the instances running web and worker containers\n3. Optionally place a load balancer in front of the instances running minio. This is required if you intended to horizontally scale minio and/or require high availability of minio. \n4. Create the required cloud services, and update the codecov.yml to use those services.\n5. Modify docker-compose.yml.\n\nIn practical terms, you will need to create a single codecov.yml and two to three different docker-compose.yml's to support this deployment. \n\nAn example deployment in AWS would do the following:\n1. Create at least three EC2 instances: two for web and worker containers, one for minio. Though more can be created if desired.\n2. Create an Application Load Balancer for the web and worker containers. Optionally, one can be created for minio. \n3. Create RDS (postgres 10+), Elasticache (redis), and an S3 bucket for the deployment. \n4. Split the standard docker-compose.yml file into a web+worker file and a minio file and deploy them to the appropriate instances.\n\nExample configuration files are shown assuming a deployment into Amazon Web Services:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"setup:\\n # Replace with the http location of your Codecov\\n # https://docs.codecov.io/docs/configuration#section-codecov-url\\n codecov_url: \\\"\\\"\\n codecov_api_url: \\\"\\\" #Codecov v4.6 and later\\n api_allowed_hosts: # Codecov version v4.6 and later\\n - \\\"\\\"\\n # Replace with your Codecov Self-Hosted License key\\n # https://docs.codecov.io/docs/configuration#section-enterprise-license\\n enterprise_license: \\\"\\\"\\n # Replace with a random string\\n # https://docs.codecov.io/docs/configuration#section-cookie-secret\\n http:\\n cookie_secret: \\\"\\\"\\ngithub:\\n client_id: \\\"\\\"\\n client_secret: \\\"\\\"\\n global_upload_token: \\\"\\\"\\nservices:\\n database_url: \\\"\\\"\\n redis_url: \\\"\\\"\\n minio:\\n host: s3.amazonaws.com\\n port: 443\\n bucket: \\n region: \\n verify_ssl: true\\n access_key_id: \\n secret_access_key: \\n #or\\n #iam_auth: true\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\nThe web and worker containers can be merged into a single docker-compose.yml and deployed. Note that, most importantly, traefik has been removed:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"version: \\\"3\\\"\\n\\nservices:\\n web:\\n image: codecov/enterprise:v4.4.8 #or newer\\n command: web\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n ports:\\n - \\\"8000:5000\\\"\\n - \\\"80:5000\\\"\\n environment:\\n - STATSD_HOST=statsd\\n depends_on:\\n - statsd\\n restart: always\\n worker:\\n image: codecov/enterprise:v4.4.8 #or newer\\n command: worker\\n volumes:\\n - ./codecov.yml:/config/codecov.yml:ro\\n environment:\\n - STATSD_HOST=statsd\\n - DATADOG_TRACE_ENABLED=false\\n depends_on:\\n - statsd\\n statsd:\\n image: prom/statsd-exporter:v0.6.0\\n command: -statsd.listen-udp=:8125 -statsd.listen-tcp=:8125\\n ports:\\n - \\\"8125\\\"\\n - \\\"9102\\\"\",\n \"language\": \"yaml\",\n \"name\": \"web+worker_docker-compose.yml\"\n }\n ]\n}\n[/block]\nIf desired, you can split the web and worker docker-compose into separate docker-compose.yml files and deploy them separately. The worker does not require any sort of HTTP access to function properly, as it only communicates via Redis. \n[block:api-header]\n{\n \"title\": \"Deployment Strategy III: High Configuration, High Availability, High Scale\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Recommended for High Scale\",\n \"body\": \"The following deployment is a near replica of what is used for Codecov's SaaS offering: codecov.io. It is recommended when high availability and high scale are required, and maintainers don't mind taking on the additional burden of Kubernetes and Terraform.\"\n}\n[/block]\nThis Deployment Strategy is recommended for the most demanding of Codecov Self-Hosted deployments. It is managed using Terraform and requires Kubernetes. Codecov has provided an terraform configuration files supporting this deployment for all three major cloud providers: Azure, AWS, and Google Cloud Platform. Those resources and supporting documentation [can be found on GitHub](https://github.com/codecov/enterprise-resources) \n[block:api-header]\n{\n \"title\": \"A Note on System Requirements and Resource Needs\"\n}\n[/block]\nThere are two main components to consider when determining the performance of the underlying server(s) that will support Codecov Self-Hosted: Web traffic to the Codecov Self-Hosted frontend, Report processing demands.\n\nSince every organization is different, it's impossible to make hard and fast recommendations that will meet every deployment's needs.\n\nAs a general building block, Codecov uses Google's n1-standard-4 for deployment of web containers and the n1-standard-8 for deployment of worker containers (see: [Google Machine Types](https://cloud.google.com/compute/docs/machine-types)) . \n\nBy far the performance bottleneck on Codecov will be coverage report processing time. Therefore it's helpful to consider resource needs in terms of number of reports processed per minute. If your install will initially process 25 or less reports per minute (i.e., 25 or fewer commits running through a codecov enabled CI/CD per minute), it is recommended to deploy the equivalent of at least 1 n1-standard-8 for all infrastructure when using Deployment Strategy I; and 2 n1-standard-8's for web+worker (to provide high availability) and 1 n1-standard-4 for minio when using Deployment Strategy II. Once deployed, the performance of each instance can be monitored and scaled up or down as needed. \n\nThis is generally a good starting point, and is straightforward to scale horizontally when using Deployment Strategy II. If larger deployments are needed, the Codecov team is happy to provide more detailed recommendations depending on specific needs.\n\n[block:api-header]\n{\n \"title\": \"V4.6.X API container customization\"\n}\n[/block]\nThe web container proxies API traffic to the API container. If you wish to change the API container host or port you need to specify environment variable(s) on the web container.\n\n### Kubernetes\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"spec:\\n containers:\\n - image: codecov/enterprise-web:latest-stable\\n env:\\n - name: CODECOV_API_HOST\\n value: \\\"your-custom-name (default: api)\\\"\\n - name: CODECOV_API_PORT\\n value: \\\"your-custom-port (default: 8000)\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n### Docker Compose\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"web:\\n image: codecov/enterprise-web:latest-stable\\n environment:\\n - \\\"CODECOV_API_HOST=your-custom-host (default: api)\\\"\\n - \\\"CODECOV_API_PORT=your-custom-port (default: 8000)\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]","excerpt":"This page outlines three types of Codecov Self-Hosted deployment that can be used to meet a wide variety of user needs.","slug":"codecov-enterprise-deployment-strategies","type":"basic","title":"Self-Hosted Deployment Strategies","__v":3,"parentDoc":"604a3fa3d6d5f0008027258b","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-09-09T21:50:40.870Z","deprecated":false},{"_id":"604a3fa3d6d5f0008027257b","order":3,"parentDoc":"604a3fa3d6d5f0008027258b","updates":["58ae19c57c8ab40f003d1531","606f757ee689f90062525cc0"],"user":"5b47e58599e0430003d8e823","version":"604a3fa3d6d5f0008027258e","__v":3,"link_external":false,"hidden":false,"project":"57b33b5ec9a4551700b969a5","title":"Deploying with Docker Compose","body":"[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Docker Compose is only meant for trialing Codecov Self-Hosted\",\n \"body\": \"Docker Compose is a helpful approach to initially trial an install of Codecov Self-Hosted\\n\\nHowever, for ongoing management of enterprise-grade implementations of Codecov Self-Hosted, we only recommend [using Terraform](https://github.com/codecov/enterprise-resources).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Installing\"\n}\n[/block]\nPlease follow the directions below to install Codecov.\n\n### Prerequisites \n\n- The system requirements range based on usage. \n - A minimum of 2GB RAM and 2 CPUs.\n- [Docker Engine](https://docs.docker.com/engine/installation/).\n- [Docker Compose](https://docs.docker.com/compose/install/).\n\n### Install and run Codecov Enterprise\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# Download assets\\ncurl -fsSL https://raw.githubusercontent.com/codecov/enterprise/v4.6/general/codecov.yml > codecov.yml\\ncurl -fsSL https://raw.githubusercontent.com/codecov/enterprise/v4.6/general/docker-compose.yml > docker-compose.yml\\n\\n# Start Codecov Enterprise\\ndocker-compose up -d\",\n \"language\": \"shell\",\n \"name\": \"install.sh\"\n }\n ]\n}\n[/block]\nDon't forget to configure your `codecov.yml` by adding a trial key and a cookie secret.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Next Steps\",\n \"body\": \"- Get a **trial license key** by contacting [Codecov Self-Hosted Sales](https://codecov.io/self-hosted).\\n- Configure your setup via the `codecov.yml`. Learn more at [Configuration](doc:configuration).\\n\\nCodecov Self-Hosted will not run without a trial license key.\"\n}\n[/block]\nOnce you have setup your license key and modified the codecov.yml to add a unique cookie string, you may navigate to `localhost` or `http://127.0.0.1/` (or your `DOCKER_HOST` otherwise set in `/etc/hosts`) to see the UI of Codecov and begin setting up Oauth with your Git provider.\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Receiving following error?\",\n \"body\": \"ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?\\n\\n1. `service docker start`\\n2. Try sudo: `sudo docker-compose up -d`\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Logs\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# all logs\\ndocker-compose logs -f\\n# just web logs\\ndocker-compose logs -f web\",\n \"language\": \"shell\",\n \"name\": null\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Upgrading\"\n}\n[/block]\nTo upgrade Codecov, please follow the directions below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker-compose pull\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t # pull new version\\ndocker-compose stop web worker # stop old containers\\ndocker-compose rm -f web worker # remove old containers\\ndocker-compose up -d --no-deps web worker # start new containers\\ndocker-compose restart nginx \\t\\t\\t\\t\\t # restart nginx\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n- New versions are tagged [here](https://github.com/codecov/enterprise/releases).\n- The Docker `latest` version will be updated with stable releases, which may slightly lag tagged releases.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Restarting\"\n}\n[/block]\nIt is important to restart `nginx`, `web`, and `worker` when changing configuration.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker-compose restart web worker nginx\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nIf you change the `docker-compose.yml` you will need to down/up the services as demonstrated next.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker-compose down\\ndocker-compose up -d\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Scaling Nodes\"\n}\n[/block]\nComing soon.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Enable SSL\"\n}\n[/block]\nTo enable SSL, please follow the directions below.\n\n### Add SSL server in `nginx.conf`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \" ...other nginx.conf is above...\\n keepalive_timeout 65;\\n\\n # REMOVE OLD SERVER\\n # server {\\n # listen 80;\\n #\\n # location / {\\n # proxy_pass_header Server;\\n # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\\n # proxy_set_header X-Real-IP $remote_addr;\\n # proxy_set_header X-Scheme $scheme;\\n # proxy_set_header Host $http_host;\\n # proxy_redirect off;\\n # proxy_pass http://frontends;\\n # }\\n # }\\n\\n # ADD NEW SERVER FOR 80 and 443\\n server {\\n listen 80;\\n return 301 https://$host$request_uri;\\n client_max_body_size 0; # accept all file upload sizes\\n }\\n\\n server {\\n listen 443;\\n keepalive_timeout 5;\\n ssl on;\\n ssl_certificate /etc/nginx/codecov.crt;\\n ssl_certificate_key /etc/nginx/codecov.key;\\n ssl_session_cache shared:SSL:10m;\\n ssl_session_timeout 10m;\\n ssl_protocols TLSv1.2;\\n ssl_prefer_server_ciphers on;\\n ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM:!3DES;\\n client_max_body_size 0; # accept all file upload sizes\\n \\n location / {\\n proxy_pass_header Server;\\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\\n proxy_set_header X-Real-IP $remote_addr;\\n proxy_set_header X-Scheme $scheme;\\n proxy_set_header Host $http_host;\\n proxy_redirect off;\\n proxy_pass http://frontends;\\n }\\n }\\n}\\n\\n\",\n \"language\": \"text\",\n \"name\": \"nginx.conf\"\n }\n ]\n}\n[/block]\n### Include certificates in `docker-compose.yml`.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n nginx:\\n volumes:\\n - ./codecov.crt:/etc/nginx/codecov.crt:ro\\n - ./codecov.key:/etc/nginx/codecov.key:ro\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\nOnce you have adjusted both the `nginx.conf` and the `docker-compose.yml`, restart the system via `docker-compose down && docker-compose up -d`.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Report archiving\"\n}\n[/block]\nReport archiving is enabled by default. Codecov will store uploaded reports in their raw, unprocessed form. This can help debug coverage, and reduce vendor lock-in. \n\n#### Enabled\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n web:\\n volumes:\\n - archive-volume:/archive\\n worker:\\n volumes:\\n - archive-volume:/archive\\nvolumes:\\n archive-volume:\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\n#### Disabled\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n web:\\n volumes:\\n # - archive-volume:/archive\\n worker:\\n volumes:\\n # - archive-volume:/archive\\nvolumes:\\n # archive-volume:\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"The `archive` folder may get very large over time.\",\n \"body\": \"Depending on your usage, the `archive` folder may become very large. We recommend mounting a NFS drive that can scale with demand.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Adding SSL pem for your git provider\"\n}\n[/block]\nDo you have a self-signed certificate with your git service provider? Please follow these directions to include the cert.pem to enable ssl communication.\n\nProvide the certificate in the volume list when starting Codecov. It is **important** to name the file after the service provider listed in your configuration.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n web:\\n volumes:\\n - ./github_enterprise.pem:/config/github_enterprise.pem:ro\\n worker:\\n volumes:\\n - ./github_enterprise.pem:/config/github_enterprise.pem:ro\",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Docker Single Container\",\n \"body\": \"Codecov does not provide support for Docker Single Container deployments\"\n}\n[/block]","category":"604a3fa3d6d5f00080272535","githubsync":"","next":{"pages":[{"type":"doc","icon":"file-text-o","name":"Other Install Notes and Updates","slug":"install-guide","category":"Codecov Self-Hosted"}],"description":""},"slug":"deploying-with-docker","createdAt":"2017-02-05T16:27:08.235Z","isReference":false,"link_url":"","sync_unique":"","type":"basic","api":{"auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"excerpt":"Using Codecov's official Docker image and docker-compose","updatedAt":"2021-04-08T21:49:47.904Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-12-11T17:46:21.082Z"},{"_id":"604a3fa3d6d5f00080272564","hidden":false,"link_url":"","order":4,"updates":["57b63d67e88dbf1900f37fc0","58ae176e7c8ab40f003d1529","5e5ecc87cc051900121e0676","5ef4d37f4e4ce20058f21424","5f92e5a5a5ea770011646e7f","5f9eada57f62f50011868639","5fd7873d207902003a8fe0ed","5fef4f3cfc0e200035ff2d67","5ff4942cb9077f02392132eb"],"createdAt":"2016-08-17T20:22:05.371Z","githubsync":"","next":{"description":"","pages":[]},"title":"Other Install Notes and Updates","type":"basic","category":"604a3fa3d6d5f00080272535","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"method":"get"},"body":"[block:api-header]\n{\n \"title\": \"Bare Metal and In-House Datacenter Deployments Deployments\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"As of January 22nd, 2019, we have deprecated support for Linux / bare metal.\",\n \"title\": \"Linux / bare metal deprecated\"\n}\n[/block]\nCodecov has deprecated bare metal deployment support. This is due to the underlying complexity these deployment approaches tend to possess compared to hosted cloud style deployments, and our inability to confidently support the myriad of different approaches that may come with deploying on bare metal.\n\nCodecov will support dockerized/containerized deployments that use cloud hosted services (e.g., AWS, GCP, Azure). By default, we will not support bare metal deployments, or on-premises deployments into a customer's own data center. but if your particular circumstances dictate such an approach, please reach out to us so we can discuss any potential ways forward. \n[block:api-header]\n{\n \"title\": \"Best Practice: Security\"\n}\n[/block]\nIn line with industry best practices, we recommend placing your self-hosted install of Codecov behind your company's firewall, or otherwise perform other access controls such that it is only accessible by trusted staff and employees. Other [Best Practices](doc:best-practices)\n[block:api-header]\n{\n \"title\": \"Codecov Self-Hosted Version Support\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Codecov Version v4.3.x and prior support deprecation\",\n \"body\": \"As of December 15, 2020, Codecov will no longer support installs of Codecov v4.3.x and prior.\"\n}\n[/block]\nCodecov will be deprecating support for installs of Codecov v4.3.x and prior as the product has appreciably changed to include updates like a newly refactored worker, support for features like Carryforward Flags, and better logging and error handling to quickly diagnose issues. Therefore, we can no longer guarantee the high standard of operability on Codecov versions prior to v4.3.x. \n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Upgrading from v4.3.x\",\n \"body\": \"Please note: if you are a customer on v4.3.x or prior, the upgrade will require a manual data migration so we would recommend a rolling migration by:\\n\\n1. Completing the new install of the latest version (this will require an additional license key, which Codecov can provide)\\n2. Updating your CI pipelines to upload coverage reports to both at once for projects currently on v4.3.x\\n3. Any new projects can be uploaded to the new install directly\\n\\nPlease reach out to the Codecov team directly at `success@codecov.io` for additional documentation.\"\n}\n[/block]","excerpt":"","isReference":false,"link_external":false,"parentDoc":"604a3fa3d6d5f0008027258b","slug":"install-guide","__v":10,"user":"5b47e58599e0430003d8e823","sync_unique":"","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","updatedAt":"2021-01-15T21:07:41.967Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-22T18:48:42.544Z"}]},{"_id":"604a3fa3d6d5f0008027258c","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[{"type":"doc","icon":"file-text-o","name":"GitHub App Integration for Codecov Self-Hosted","slug":"how-to-create-a-github-app-for-codecov-enterprise","category":"Codecov Self-Hosted"},{"type":"doc","icon":"file-text-o","name":"Team Bot","slug":"team-bot","category":"Codecov Yaml"},{"type":"doc","icon":"file-text-o","name":"Codecov Uploader","slug":"codecov-uploader","category":"Concepts"}]},"title":"Integrations for Codecov Self-Hosted","updates":[],"type":"basic","slug":"integrations-for-codecov-self-hosted","excerpt":"","body":"Beyond the [installation step](doc:installing-codecov-self-hosted), key integrations for Codecov self-hosted include:\n\n1. [Team Bot](doc:team-bot) \n\n2. Integrating your CI provider using the [Codecov Uploader](doc:codecov-uploader)","order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-01-07T22:56:10.665Z","createdAt":"2021-01-08T20:20:14.613Z","updatedAt":"2021-08-05T13:38:12.894Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":2,"parentDoc":null,"children":[{"_id":"604a3fa3d6d5f00080272580","version":"604a3fa3d6d5f0008027258e","updatedAt":"2021-07-23T10:06:41.201Z","createdAt":"2019-08-29T14:07:07.078Z","project":"57b33b5ec9a4551700b969a5","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","updates":["5f80f55857e01c0011dbf3d9","5fcfd5c724e13c00112dc4f3","60884ce132a1c5007a683636","60fa2e3c783c80001054ac4a"],"next":{"pages":[],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":0,"body":"[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nRather than using a Team Bot, a GitHub App Integration can be used in GitHub (Cloud or Self-Hosted) to efficiently onboard new teams to Codecov. \n\nThis Github App integration is not a replacement for the [Oauth Login setup](doc:set-up-oauth-login), which is mandatory.\n\nThe App Integration will allow teams to add Codecov directly to their repositories via the GitHub user interface.\n\nThis integration is meant to be a replacement for the [Team Bot](doc:team-bot) for GitHub (Cloud or Self-Hosted). Using it will ensure that comments are posted to Pull Requests as *Codecov*, rather than a Team Bot user.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"This Approach works for both GitHub and GitHub Enterprise\",\n \"body\": \"Regardless of which github version you're using this approach can work for either. However you will need to be mindful of adapting the code snippets to your particular scenario (i.e., github, or github_enterprise in the codecov.yml)\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Creating a GitHub App Integration\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Enable webhooks\",\n \"body\": \"Webhooks need to be enabled for the GitHub App to work. This is the method the app uses to connect and communicate with Codecov.\"\n}\n[/block]\nTo create a GitHub App Integration for Codecov, first navigate to your organization in the GitHub UI.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/a40b816-Screenshot_from_2020-12-16_15-38-03.png\",\n \"Screenshot from 2020-12-16 15-38-03.png\",\n 708,\n 262,\n \"#f4f3f4\"\n ],\n \"caption\": \"You can use the drop down in the left sidebar of the Settings page in GitHub to access your organization.\"\n }\n ]\n}\n[/block]\nThen from the Sidebar Click Developer Settings > GitHub Apps:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/62526d3-Screen_Shot_2019-08-29_at_10.00.27_AM.png\",\n \"Screen Shot 2019-08-29 at 10.00.27 AM.png\",\n 516,\n 300,\n \"#f5f7f8\"\n ]\n }\n ]\n}\n[/block]\nChoose \"New GitHub App\":\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f6ec684-Screen_Shot_2020-12-07_at_4.37.25_PM.png\",\n \"Screen Shot 2020-12-07 at 4.37.25 PM.png\",\n 1296,\n 1326,\n \"#f6f8f8\"\n ]\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Create the App for your Organization\",\n \"body\": \"When creating the GitHub app, ensure that you're creating it for your organization, not your personal account. The URL on the app creation page should read: https://github.com/settings/apps/new\"\n}\n[/block]\nAnd fill out the relevant fields for app creation:\n\nIt's important to set the proper callback URL. They should point to your Codecov Enterprise install as follows:\n\n* `/login/ghe`\n\nFor the webhook URL:\n* `/webhooks/github_enterprise`\n\n**You should provide a secret. **\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github:
 \\n webhook_secret: \\\"\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nOnce provided, you will want to ensure that you properly provide the secret in the Codecov Enterprise codecov.yml. \n\n\n## Permissions\n\nThe following screenshot shows all permissions needed by the app integration, as well as the relevant events. For visibility permissions with a greater setting than \"No Access\" have been emphasized in green.\n\n### Repository Permissions\n\n\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/bf2b97a-github-app-integration-repository-permissions.png\",\n \"github-app-integration-repository-permissions.png\",\n 788,\n 1097,\n \"#f7f9f8\"\n ],\n \"caption\": \"Required repository permissions.\"\n }\n ]\n}\n[/block]\n### Organization Permissions\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/ad983db-github-app-integration-organization-permissions.png\",\n \"github-app-integration-organization-permissions.png\",\n 768,\n 616,\n \"#f9fafa\"\n ],\n \"caption\": \"Required organization permissions\"\n }\n ]\n}\n[/block]\n### User Permissions\n\nNo user permissions are required. All can be set to \"No Access\"\n\n## Events\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/6e53c98-github-app-integration-events.png\",\n \"github-app-integration-events.png\",\n 834,\n 1337,\n \"#f8f9f9\"\n ],\n \"caption\": \"Required user permissions.\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Using GitHub.com?\",\n \"body\": \"If you're not using GitHub Enterprise, make sure that you only publish this app for your organization.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Generate and Add a PEM file to Codecov.\"\n}\n[/block]\nAfter creating the GitHub App, Github will prompt you to create a .pem file from the github ui. This will result in a .pem file you can download. Once downloaded you will need to place this file in the same directory as your codecov.yml and docker-compose.yml and update your docker-compose.yml as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"web:\\n #... other configuration\\n volumes:\\n \\t- ./file.pem:/config/file.pem \\nworker:\\n #... other configuration\\n volumes:\\n \\t- ./file.pem:/config/file.pem \",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\nYou will need to add the `integration` and `webhook_secret` sections to the `github` (or `github_enterprise`) section of your codecov.yml as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github: \\n# ...\\n webhook_secret: \\\"ff523b3162ef64604f03c94459\\\"\\n\\n# values from the Github App integration\\n integration:\\n id: 63040 # App ID value shown on \\nyour integration's page in GitHub\\n pem: /config/file.pem # path to the pem file you \\ncreated in the `web` and `worker` containers.\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Install App Integration to your organizations\"\n}\n[/block]\nDepending on your GitHub settings, you may have to install the Codecov Github App on any organizations that you wish to use it with. This can be done from the app settings screen.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4c11ff7-Screenshot_2021-04-27_121932.png\",\n \"Screenshot 2021-04-27 121932.png\",\n 1048,\n 395,\n \"#fcfcfc\"\n ]\n }\n ]\n}\n[/block]\nAfter installing the app you can verify installation on the organization's installed GitHub apps page.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4e7c0fd-Screenshot_2021-04-27_124048.png\",\n \"Screenshot 2021-04-27 124048.png\",\n 1618,\n 731,\n \"#f6f7f7\"\n ]\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Troubleshooting\"\n}\n[/block]\n* If you don't receive comments on Pull Requests for Repositories with the App Integration installed, visit the repo settings page for that particular repository on your Codecov Enterprise install: \n\nFor GitHub.com:\n`/gh//>/settings`\n\nFor GitHub Enterprise:\n`/ghe//>/settings`\n\nOnce there, check the \"GitHub Webhook\" section and press the \"Create Web Hook\" button if a webhook is not already set.","excerpt":"","slug":"how-to-create-a-github-app-for-codecov-enterprise","type":"basic","title":"GitHub App Integration for Codecov Self-Hosted","__v":4,"parentDoc":"604a3fa3d6d5f0008027258c","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-09T19:18:41.596Z"}],"childrenPages":[{"_id":"604a3fa3d6d5f00080272580","version":"604a3fa3d6d5f0008027258e","updatedAt":"2021-07-23T10:06:41.201Z","createdAt":"2019-08-29T14:07:07.078Z","project":"57b33b5ec9a4551700b969a5","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","updates":["5f80f55857e01c0011dbf3d9","5fcfd5c724e13c00112dc4f3","60884ce132a1c5007a683636","60fa2e3c783c80001054ac4a"],"next":{"pages":[],"description":""},"link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":"","method":"get"},"isReference":false,"order":0,"body":"[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nRather than using a Team Bot, a GitHub App Integration can be used in GitHub (Cloud or Self-Hosted) to efficiently onboard new teams to Codecov. \n\nThis Github App integration is not a replacement for the [Oauth Login setup](doc:set-up-oauth-login), which is mandatory.\n\nThe App Integration will allow teams to add Codecov directly to their repositories via the GitHub user interface.\n\nThis integration is meant to be a replacement for the [Team Bot](doc:team-bot) for GitHub (Cloud or Self-Hosted). Using it will ensure that comments are posted to Pull Requests as *Codecov*, rather than a Team Bot user.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"This Approach works for both GitHub and GitHub Enterprise\",\n \"body\": \"Regardless of which github version you're using this approach can work for either. However you will need to be mindful of adapting the code snippets to your particular scenario (i.e., github, or github_enterprise in the codecov.yml)\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Creating a GitHub App Integration\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Enable webhooks\",\n \"body\": \"Webhooks need to be enabled for the GitHub App to work. This is the method the app uses to connect and communicate with Codecov.\"\n}\n[/block]\nTo create a GitHub App Integration for Codecov, first navigate to your organization in the GitHub UI.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/a40b816-Screenshot_from_2020-12-16_15-38-03.png\",\n \"Screenshot from 2020-12-16 15-38-03.png\",\n 708,\n 262,\n \"#f4f3f4\"\n ],\n \"caption\": \"You can use the drop down in the left sidebar of the Settings page in GitHub to access your organization.\"\n }\n ]\n}\n[/block]\nThen from the Sidebar Click Developer Settings > GitHub Apps:\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/62526d3-Screen_Shot_2019-08-29_at_10.00.27_AM.png\",\n \"Screen Shot 2019-08-29 at 10.00.27 AM.png\",\n 516,\n 300,\n \"#f5f7f8\"\n ]\n }\n ]\n}\n[/block]\nChoose \"New GitHub App\":\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f6ec684-Screen_Shot_2020-12-07_at_4.37.25_PM.png\",\n \"Screen Shot 2020-12-07 at 4.37.25 PM.png\",\n 1296,\n 1326,\n \"#f6f8f8\"\n ]\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Create the App for your Organization\",\n \"body\": \"When creating the GitHub app, ensure that you're creating it for your organization, not your personal account. The URL on the app creation page should read: https://github.com/settings/apps/new\"\n}\n[/block]\nAnd fill out the relevant fields for app creation:\n\nIt's important to set the proper callback URL. They should point to your Codecov Enterprise install as follows:\n\n* `/login/ghe`\n\nFor the webhook URL:\n* `/webhooks/github_enterprise`\n\n**You should provide a secret. **\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github:
 \\n webhook_secret: \\\"\\\"\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nOnce provided, you will want to ensure that you properly provide the secret in the Codecov Enterprise codecov.yml. \n\n\n## Permissions\n\nThe following screenshot shows all permissions needed by the app integration, as well as the relevant events. For visibility permissions with a greater setting than \"No Access\" have been emphasized in green.\n\n### Repository Permissions\n\n\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/bf2b97a-github-app-integration-repository-permissions.png\",\n \"github-app-integration-repository-permissions.png\",\n 788,\n 1097,\n \"#f7f9f8\"\n ],\n \"caption\": \"Required repository permissions.\"\n }\n ]\n}\n[/block]\n### Organization Permissions\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/ad983db-github-app-integration-organization-permissions.png\",\n \"github-app-integration-organization-permissions.png\",\n 768,\n 616,\n \"#f9fafa\"\n ],\n \"caption\": \"Required organization permissions\"\n }\n ]\n}\n[/block]\n### User Permissions\n\nNo user permissions are required. All can be set to \"No Access\"\n\n## Events\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/6e53c98-github-app-integration-events.png\",\n \"github-app-integration-events.png\",\n 834,\n 1337,\n \"#f8f9f9\"\n ],\n \"caption\": \"Required user permissions.\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Using GitHub.com?\",\n \"body\": \"If you're not using GitHub Enterprise, make sure that you only publish this app for your organization.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Generate and Add a PEM file to Codecov.\"\n}\n[/block]\nAfter creating the GitHub App, Github will prompt you to create a .pem file from the github ui. This will result in a .pem file you can download. Once downloaded you will need to place this file in the same directory as your codecov.yml and docker-compose.yml and update your docker-compose.yml as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"web:\\n #... other configuration\\n volumes:\\n \\t- ./file.pem:/config/file.pem \\nworker:\\n #... other configuration\\n volumes:\\n \\t- ./file.pem:/config/file.pem \",\n \"language\": \"yaml\",\n \"name\": \"docker-compose.yml\"\n }\n ]\n}\n[/block]\nYou will need to add the `integration` and `webhook_secret` sections to the `github` (or `github_enterprise`) section of your codecov.yml as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"github: \\n# ...\\n webhook_secret: \\\"ff523b3162ef64604f03c94459\\\"\\n\\n# values from the Github App integration\\n integration:\\n id: 63040 # App ID value shown on \\nyour integration's page in GitHub\\n pem: /config/file.pem # path to the pem file you \\ncreated in the `web` and `worker` containers.\",\n \"language\": \"yaml\",\n \"name\": \"codecov.yml\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Install App Integration to your organizations\"\n}\n[/block]\nDepending on your GitHub settings, you may have to install the Codecov Github App on any organizations that you wish to use it with. This can be done from the app settings screen.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4c11ff7-Screenshot_2021-04-27_121932.png\",\n \"Screenshot 2021-04-27 121932.png\",\n 1048,\n 395,\n \"#fcfcfc\"\n ]\n }\n ]\n}\n[/block]\nAfter installing the app you can verify installation on the organization's installed GitHub apps page.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/4e7c0fd-Screenshot_2021-04-27_124048.png\",\n \"Screenshot 2021-04-27 124048.png\",\n 1618,\n 731,\n \"#f6f7f7\"\n ]\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Troubleshooting\"\n}\n[/block]\n* If you don't receive comments on Pull Requests for Repositories with the App Integration installed, visit the repo settings page for that particular repository on your Codecov Enterprise install: \n\nFor GitHub.com:\n`/gh//>/settings`\n\nFor GitHub Enterprise:\n`/ghe//>/settings`\n\nOnce there, check the \"GitHub Webhook\" section and press the \"Create Web Hook\" button if a webhook is not already set.","excerpt":"","slug":"how-to-create-a-github-app-for-codecov-enterprise","type":"basic","title":"GitHub App Integration for Codecov Self-Hosted","__v":4,"parentDoc":"604a3fa3d6d5f0008027258c","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-09T19:18:41.596Z"}]},{"_id":"604a3fa3d6d5f0008027258d","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Ongoing Management of Codecov Self-Hosted","updates":["6011e6beacd72900dc72dd78"],"type":"basic","slug":"ongoing-management-of-codecov-self-hosted","excerpt":"","body":"As you continue to manage Codecov's self-hosted version, continue reading for additional metrics and services that you can add to your install:\n\n[Metrics Exposed to StatsD\n](doc:metrics-exposed-to-statsd)\n[Archiving Reports\n](doc:archiving-reports)\n[Database Backups](database-backups)","order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-01-07T22:56:11.602Z","createdAt":"2021-01-08T20:21:52.767Z","updatedAt":"2021-01-28T15:09:06.948Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":1,"parentDoc":null,"children":[{"_id":"604a3fa3d6d5f00080272585","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Metrics Exposed to StatsD","updates":[],"type":"basic","slug":"metrics-exposed-to-statsd","excerpt":"","body":"[block:api-header]\n{\n \"title\": \"Codecov Metrics and Monitoring\"\n}\n[/block]\nCodecov Enterprise exports several meaningful metrics via a StatsD interface for consumption by other applications, such as Prometheus, Grafana, and DataDog. This page describes how to include StatsD in your Codecov Enterprise installation, and provides a reference to the metrics currently exposed to StatsD. \n[block:api-header]\n{\n \"title\": \"How to Integrate StatsD\"\n}\n[/block]\n### For Docker Compose Based Installations\n\nThe best reference for docker compose based installations is [this dockerfile](https://github.com/codecov/enterprise/blob/v4.6/metrics/docker-compose.yml), which shows Codecov Self-Hosted orchestrated with StatsD, Prometheus, and Grafana. This approach is recommended for all docker compose based deployments.\n\n### For other installation methods\n\nFor all other installation methods, please contact support, as approaches may vary and are best discussed in the context of your installation.\n[block:api-header]\n{\n \"title\": \"Metric Reference\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Metrics are Populated as They're Encountered\",\n \"body\": \"Codecov Enterprise does not initialize all metrics at startup. Rather, metrics are initialized when they're first encountered during program execution. If you find that you are not receiving certain metrics, it is likely they have not been passed to StatsD from Codecov Self-Hosted yet.\"\n}\n[/block]\n*Last updated March 23rd, 2021* \n\n### Web Components\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Metric\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"h-3\": \"Version Introduced\",\n \"0-0\": \"web.redis.chunks.get\",\n \"0-1\": \"timer\",\n \"0-2\": \"Time taken to decompress chunk files pulled from redis. Used in report merging\",\n \"0-3\": \"4.4.0\",\n \"1-0\": \"web.redis.chunks.set\",\n \"1-1\": \"timer\",\n \"1-2\": \"Time taken to write chunk files to redis. Used in report merging\",\n \"1-3\": \"4.4.0\",\n \"2-0\": \"web.archive.chunks.get\",\n \"2-1\": \"timer\",\n \"2-2\": \"Time taken to retrieve chunks from the archive storage. Used in report merging.\",\n \"2-3\": \"4.4.0\",\n \"3-0\": \"web.uploads.accepted\",\n \"3-1\": \"increment\",\n \"3-2\": \"The count of uploads successfully accepted by Codecov\",\n \"4-0\": \"web.uploads.rejected\",\n \"4-1\": \"increment\",\n \"4-2\": \"The count of uploads rejected by Codecov\",\n \"3-3\": \"4.4.0\",\n \"4-3\": \"4.4.0\",\n \"h-4\": \"Version Introduced\",\n \"0-4\": \"4.4.0\",\n \"1-4\": \"4.4.0\",\n \"2-4\": \"4.4.0\",\n \"3-4\": \"4.4.0\",\n \"4-4\": \"4.4.0\"\n },\n \"cols\": 3,\n \"rows\": 6\n}\n[/block]\n### Worker Components\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Metric\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"h-3\": \"Version Introduced\",\n \"0-0\": \"Notify Task\\n(worker.task.app.tasks.notify)\",\n \"0-1\": \"timer\",\n \"0-2\": \"Time taken for the worker to send a notification\",\n \"0-3\": \"4.4.0\",\n \"1-0\": \"Upload Processor Task\\n(worker.task.app.tasks.upload_processor.UploadProcessorTask)\",\n \"1-1\": \"timer\",\n \"1-2\": \"Time taken to process an uploaded report\",\n \"1-3\": \"4.4.0\",\n \"2-0\": \"Team Sync Task\\n(worker.task.app.tasks.sync_teams.SyncTeams)\",\n \"2-1\": \"timer\",\n \"2-2\": \"Time taken to sync teams\",\n \"2-3\": \"4.4.0\",\n \"3-0\": \"Upload Task\\n(worker.task.app.tasks.upload.Upload)\",\n \"3-1\": \"timer\",\n \"3-2\": \"Time taken to retrieve a raw uploaded report from the archive\",\n \"4-0\": \"Repo Sync\\n(worker.task.app.tasks.sync_repos.SyncRepos)\",\n \"4-1\": \"timer\",\n \"4-2\": \"Time taken to sync repos from the Git provider\",\n \"3-3\": \"4.4.0\",\n \"4-3\": \"4.4.0\",\n \"5-0\": \"PR Sync Task\\n(worker.task.app.tasks.pulls.Sync)\",\n \"5-2\": \"Time taken to complete a PR notification\",\n \"5-1\": \"timer\",\n \"5-3\": \"4.4.0\",\n \"6-0\": \"celery.queue.%s.len\",\n \"6-1\": \"guage\",\n \"6-2\": \"Length of various upload queues. This is a very important set of metrics, and are used to indicate the length of currently active jobs that are remaining to be processed by Codecov at any given time. Ideally, the length of any of these queues should be at or near 0. %s can represent main Celery queue, \\\"celery\\\", Uploads queue \\\"uploads\\\" or New tasks queue \\\"new_tasks\\\"\",\n \"6-3\": \"4.4.0\"\n },\n \"cols\": 3,\n \"rows\": 7\n}\n[/block]\nComplete list of available metrics for self hosted customers can be obtained from your account rep.","order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"createdAt":"2020-05-04T21:18:39.317Z","updatedAt":"2021-05-17T19:20:23.890Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":"604a3fa3d6d5f0008027258d","previousSlug":"","slugUpdatedAt":"2021-01-08T07:17:35.204Z"},{"_id":"604a3fa3d6d5f0008027256a","excerpt":"","isReference":false,"project":"57b33b5ec9a4551700b969a5","sync_unique":"","version":"604a3fa3d6d5f0008027258e","body":"[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nCodecov Self-Hosted stores uploaded coverage reports in a persistent archive. This archive is optional, but much of Codecov's more advanced functionality -- such as overlaying coverage on diffs -- isn't possible without using it. \n\nStarting with version 4.4.0, the archive is supported using [minio](https://minio.io/), which provides an S3-like abstraction to any underlying storage. This allows Codecov to support a myriad of storage back ends that can allow you to tailor report archival directly to your needs and internal requirements. \n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Cloud Storage is supported by Codecov Self-Hosted v4.4.4 or newer\",\n \"body\": \"Codecov Self-Hosted versions 4.4.0 to 4.4.3 do not support S3, Google Cloud Storage, etc as possible storage backends. If you're using one of these versions and wish to leverage cloud storage, it is recommended to upgrade first. \\n\\nSome minio configuration is unique to v4.4.4+. This configuration is noted inline wherever configuration is displayed below.\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Archived reports may contain source code\",\n \"body\": \"Some languages include source code with coverage reports (ex., Swift, gcov, Lua).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"General Instructions\"\n}\n[/block]\nThere are two basic steps to archive deployment with minio: \n\n1. Setup minio in accordance with your infrastructure/dev ops best practices\n2. Provide credentials to access that minio install in your `codecov.yml`\n\nThe `codecov.yml` configuration for minio is as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio: \\n hash_key: \\n verify_ssl: false # use true for SSL termination on minio \\n host: minio # v4.4.4+ set to host where minio is installed \\n port: 9000\\n bucket: archive # bucket name in storage\\n region: None # region where bucket is stored (e.g., us-east1)\\n access_key_id: \\\"codecov-default-key\\\"\\n secret_access_key: \\\"codecov-default-secret\\\"\\n dsn: \\\"http://minio:9000\\\" #for v4.4.3 and below only.\\n periodic_callback_ms: 10800000 #bool or int. set to false to disable fully\\n expire_raw_after_n_days: 30 #int. default is 30 days.\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nThis is the basic configuration for minio. Each of the sections is described below:\n\n* *hash_key* - a random string used to obfuscate the repositories for which reports are associated. Once this is set and reports are uploaded, do not change it. A default is supplied if this is not specified in your `codecov.yml`\n* *verify_ssl* - set this to true if you're deploying minio [using SSL](https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls.html). \n* *host* - *v4.4.4+* the host name of your minio deployment if it is deployed separately from your Codecov Self-Hosted install. Examples include: `minio.my-company.com`. Defaults to `minio`\n* *port* - the port number where minio is accessible at `host`. Defaults to 9000\n* *region* - for cloud storage backends, this is the region where the bucket was created.\n* *access_key_id* - the key used to access the minio ui, doubles as auth for some cloud storage backends. Default is \"codecov-default-key\", we highly recommend changing this\n* *secret_access_key* - the secret used to access the minio ui, doubles as auth for some cloud storage backends. Default is \"codecov-default-secret\" we highly recommend changing this.\n* *periodic_callback_ms* - If set to an int, *N*, Codecov will attempt to periodically delete raw uploads from the archive that are older than `expire_raw_after_n_days` old every *N* ms. The default age is thirty days. Setting this to `false` will preserve all uploaded reports in perpetuity. \n* *expire_raw_after_n_days* - The number of days to keep raw uploaded reports. By default, 30 days. This setting is ignored if `periodic_callback_ms` is set to `false`. \n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Use Bucket Retention Policy\",\n \"body\": \"Although Codecov can clean up the old, raw reports as noted above, we suggest to setup retention policies in your storage provider (such as S3). This process is a lot more efficient, when handled by the storage provider natively, rather than through and external application, which can be resource intensive.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Configuration I: Minio with Docker Volume\"\n}\n[/block]\nThe most basic deployment is to use minio as a docker container in your self-hosted `docker-compose.yml` and back it with a Docker volume. The benefit to this approach is that it's very easy to setup and is generally recommended for the trial or proof of concept stage of your Codecov Self-Hosted deployment. \n\nThis is the default setup for archive storage if you follow the Codecov Self-Hosted [Deploying with Docker](https://docs.codecov.io/docs/deploying-with-docker) install instructions. There is no need to update any configuration to use minio with a docker volume, it is the default supported use case. \n\nTo support minio with a docker volume, the following is used in `docker-compose.yml` and `codecov.yml` respectively:\n\n**docker-compose.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \" minio:\\n image: minio/minio:RELEASE.2018-08-02T23-11-36Z #earliest known working release\\n command: server /export\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=minio\\\"\\n - \\\"traefik.port=9000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /archive,/minio\\\"\\n ports:\\n - \\\"9000\\\"\\n environment:\\n - MINIO_ACCESS_KEY=codecov-default-key\\n - MINIO_SECRET_KEY=codecov-default-secret\\n volumes:\\n - archive-volume:/export\\n networks:\\n - codecov\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nConfigurable options are as follows:\n\n* *volumes* - by default Codecov Self-Hosted uses a volume created in the `docker-compose.yml` file. If you want to use a persistent storage option, such a mounted network drive, you do so by changing the volume parameter: ` - /path/to/volume:/export`\n* *MINIO_ACCESS_KEY* and *MINIO_SECRET_KEY* in this configuration these are only used as login credentials for the minio browser UI. They can be changed to anything you like as long as the appropriate changes are made in `codecov.yml` \n\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio: \\n access_key_id: \\n secret_access_key: \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIn the default configuration, the `minio` configuration in `codecov.yml` is not needed. However, if you update the `MINIO_ACCESS_KEY` and/or `MINIO_SECRET_KEY` you should include those changed values as demonstrated above. \n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Configurations II and III assume you're using docker-compose.yml\",\n \"body\": \"Configurations II and III detail how to setup minio in your `docker-compose.yml` backed with S3 or Google Cloud Storage. You can follow the examples below, and the minio docs for other storage options, such as [Azure](https://docs.minio.io/docs/minio-gateway-for-azure.html) and [NAS](https://docs.minio.io/docs/minio-gateway-for-nas.html).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Configuration II: Minio with S3\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Create your Bucket First\",\n \"body\": \"When using S3 it is important to make sure that your bucket is created before starting Codecov Self-Hosted with minio in this configuration\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"The following configuration requires Codecov Enterprise v4.4.4\",\n \"body\": \"Using minio with S3 is only available for Codecov Enterprise v4.4.4 and newer\"\n}\n[/block]\nYou can use minio with s3 by updating the `docker-compose.yml` and the `codecov.yml`. \n\n**docker-compose.yml** \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"minio:\\n image: minio/minio\\n command: gateway s3\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=minio\\\"\\n - \\\"traefik.port=9000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /archive,/minio,/\\\"\\n ports:\\n - \\\"9000\\\"\\n environment:\\n - MINIO_ACCESS_KEY=\\n - MINIO_SECRET_KEY=\\n networks:\\n - codecov\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio:\\n bucket: \\n region: \\n access_key_id: \\n secret_access_key: \\n iam_auth: \\n port: 443\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nImportant notes:\n* The port field is required and if omitted, may result in failed uploads.\n* Be sure to substitute `` with the S3 bucket you created.\n* The `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` must be set to the AWS Access Key and Secret of an account that can properly access your bucket in S3.\n* The `access_key_id` and `secret_access_key` in the codecov.yml file must also match the AWS Access Key and AWS Secret provided in the `docker-compose-yml`\n* Alternatively, `iam_auth` can be set to true when running in AWS. It will attempt to authenticate via the role associated with the instance.\n[block:api-header]\n{\n \"title\": \"Configuration III: Minio with Google Cloud Storage\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Create Your Bucket and Service Account First\",\n \"body\": \"Before restarting Codecov Enterprise to use a Google Cloud Storage bucket, make sure that bucket exists and you've created a service account that can properly access the bucket.\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"Using minio with Google Cloud Storage is only available for Codecov Self-Hosted v4.4.4 and newer.\",\n \"title\": \"The following configuration requires Codecov Enterprise v4.4.4\"\n}\n[/block]\nYou can use minio with Google Cloud Storage by updating the `docker-compose.yml` and the `codecov.yml`. \n\nIn addition to creating the bucket in GCS first, you must take the extra step of creating a Google Cloud Service Account that can access minio. You must also download the corresponding credentials.json file for the service account. [The minio documentation outlines how to do this](https://docs.minio.io/docs/minio-gateway-for-gcs.html). \n\nAfter the bucket has been created and you've downloaded the credentials.json file, you can update your docker-compose.yml and codecov.yml\n\n**docker-compose.yml** \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"minio:\\n image: minio/minio:RELEASE.2018-08-02T23-11-36Z\\n command: gateway gcs\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=minio\\\"\\n - \\\"traefik.port=9000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /archive,/minio,/\\\"\\n ports:\\n - \\\"9000\\\"\\n volumes:\\n - ./path/to/your/credentials.json:/credentials.json \\n environment:\\n - GOOGLE_APPLICATION_CREDENTIALS=/credentials.json\\n - MINIO_ACCESS_KEY=\\n - MINIO_SECRET_KEY=\\n networks:\\n - codecov\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n minio: \\n hash_key: \\n verify_ssl: \\n bucket: \\n region: \\n port: 443\\n access_key_id: \\n secret_access_key: \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nImportant notes:\n\n* Be sure to change `/` in the `docker-compose.yml` with the name of the bucket you create in GCS.\n* The `GOOGLE_APPLICATION_CREDENTIALS` envrionment variable should point to the location of the credentials file in the minio container (typically /credentials.json)\n* The `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` are only used to login to the minio UI dashboard in this configuration. \n* The port field is required and if omitted, may result in failed uploads.\n[block:api-header]\n{\n \"title\": \"Configuration IV: External Minio\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"The following configuration requires Codecov Self-Hosted v4.4.4\",\n \"body\": \"External minio is only supported with Codecov Self-Hosted v4.4.4 and newer.\"\n}\n[/block]\nFinally, it may be desired to run minio outside the default docker-compose setup. This is typically required for more advanced deployments, such as those in kubernetes. \n\n[The minio site](https://minio.io/kubernetes.html) outlines various deployment strategies that may be of interest, and it is beyond the scope of this documentation to detail each one. \n\nHowever, if you're going to deploy minio outside of docker-compose, you still need to update the `codecov.yml` file.\n\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio: \\n verify_ssl: false # use true for SSL termination on minio \\n host: minio.my-company.com \\n port: 9000\\n bucket: \\n region: \\n access_key_id: \\n secret_access_key: \\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nImportant notes:\n\n* Set `verify_ssl` to true if you want to use minio with HTTPS. You'll need to follow [minio's TLS guide](https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls.html) to ensure your minio server is configured properly for this.\n* The `bucket` and `region` parameters can be ommitted if your hosted version of minio does not use cloud storage.\n[block:api-header]\n{\n \"title\": \"Migrating Data from an Existing Setup\"\n}\n[/block]\nIf you are using an older version of Codecov Self-Hosted and want to migrate your archived report data, please contact us at support@codecov.io, or other communication channels you may already have in place. \n\nIn nearly all cases, it is possible with some amount of effort to move legacy archival data to Codecov v4.4.x, and in some cases even migrate that data to a cloud based storage backend.","githubsync":"","order":1,"user":"5fb6f9444c67b600282c5169","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"method":"get"},"hidden":false,"next":{"pages":[],"description":""},"slug":"archiving-reports","title":"Archiving Reports","type":"basic","updates":["58ae276736bcf20f00006b8d","5fb6fc802b2412004cbb633a","5fd78a171328fc001895f601","60dcdc3aad49f100109b9f84"],"__v":4,"category":"604a3fa3d6d5f00080272535","createdAt":"2016-09-13T13:32:39.492Z","link_external":false,"link_url":"","parentDoc":"604a3fa3d6d5f0008027258d","updatedAt":"2021-11-04T14:21:39.445Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-11-19T21:31:18.230Z"},{"_id":"604a3fa3d6d5f00080272569","excerpt":"","isReference":false,"order":2,"slug":"database-backups","sync_unique":"","updates":["58ae26f723d64e0f00211413"],"api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":""},"githubsync":"","link_url":"","next":{"description":"","pages":[]},"body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Create a Backup\"\n}\n[/block]\nThe script below will run a on-off container that will run `pg_dump` and write the results to the file `backup.db`. This process could take a while, depending on the size of the database.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker run -it --rm --link codecov-postgres:postgres postgres pg_dump -Fc -h postgres -U postgres > backup.db\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Recover From a Backup\"\n}\n[/block]\nThe script below is used to run a on-off container with the backup file mounted. `pg_restore` will run with 2 processes.\n\nConcerning `-j2`, the optimal value for this option depends on the hardware setup of the server, of the client, and of the network. Factors include the number of CPU cores, and the disk setup. A good place to start is the number of CPU cores on the server, but values larger than that can also lead to faster restore times in many cases. Of course, values that are too high will lead to decreased performance because of thrashing.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker run -it --rm -v \\\"$PWD/backup.db:/backup.db\\\" --link codecov-postgres:postgres postgres pg_restore -h postgres -U postgres -j2 /backup.db\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","category":"604a3fa3d6d5f00080272535","type":"basic","version":"604a3fa3d6d5f0008027258e","link_external":false,"project":"57b33b5ec9a4551700b969a5","hidden":false,"parentDoc":"604a3fa3d6d5f0008027258d","title":"Database Backups","user":"57b33af9eeec08220094ea97","__v":1,"createdAt":"2016-08-18T11:44:03.620Z","updatedAt":"2019-12-06T17:00:07.756Z","metadata":{"title":"","description":"","image":[]}}],"childrenPages":[{"_id":"604a3fa3d6d5f00080272585","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Metrics Exposed to StatsD","updates":[],"type":"basic","slug":"metrics-exposed-to-statsd","excerpt":"","body":"[block:api-header]\n{\n \"title\": \"Codecov Metrics and Monitoring\"\n}\n[/block]\nCodecov Enterprise exports several meaningful metrics via a StatsD interface for consumption by other applications, such as Prometheus, Grafana, and DataDog. This page describes how to include StatsD in your Codecov Enterprise installation, and provides a reference to the metrics currently exposed to StatsD. \n[block:api-header]\n{\n \"title\": \"How to Integrate StatsD\"\n}\n[/block]\n### For Docker Compose Based Installations\n\nThe best reference for docker compose based installations is [this dockerfile](https://github.com/codecov/enterprise/blob/v4.6/metrics/docker-compose.yml), which shows Codecov Self-Hosted orchestrated with StatsD, Prometheus, and Grafana. This approach is recommended for all docker compose based deployments.\n\n### For other installation methods\n\nFor all other installation methods, please contact support, as approaches may vary and are best discussed in the context of your installation.\n[block:api-header]\n{\n \"title\": \"Metric Reference\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Metrics are Populated as They're Encountered\",\n \"body\": \"Codecov Enterprise does not initialize all metrics at startup. Rather, metrics are initialized when they're first encountered during program execution. If you find that you are not receiving certain metrics, it is likely they have not been passed to StatsD from Codecov Self-Hosted yet.\"\n}\n[/block]\n*Last updated March 23rd, 2021* \n\n### Web Components\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Metric\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"h-3\": \"Version Introduced\",\n \"0-0\": \"web.redis.chunks.get\",\n \"0-1\": \"timer\",\n \"0-2\": \"Time taken to decompress chunk files pulled from redis. Used in report merging\",\n \"0-3\": \"4.4.0\",\n \"1-0\": \"web.redis.chunks.set\",\n \"1-1\": \"timer\",\n \"1-2\": \"Time taken to write chunk files to redis. Used in report merging\",\n \"1-3\": \"4.4.0\",\n \"2-0\": \"web.archive.chunks.get\",\n \"2-1\": \"timer\",\n \"2-2\": \"Time taken to retrieve chunks from the archive storage. Used in report merging.\",\n \"2-3\": \"4.4.0\",\n \"3-0\": \"web.uploads.accepted\",\n \"3-1\": \"increment\",\n \"3-2\": \"The count of uploads successfully accepted by Codecov\",\n \"4-0\": \"web.uploads.rejected\",\n \"4-1\": \"increment\",\n \"4-2\": \"The count of uploads rejected by Codecov\",\n \"3-3\": \"4.4.0\",\n \"4-3\": \"4.4.0\",\n \"h-4\": \"Version Introduced\",\n \"0-4\": \"4.4.0\",\n \"1-4\": \"4.4.0\",\n \"2-4\": \"4.4.0\",\n \"3-4\": \"4.4.0\",\n \"4-4\": \"4.4.0\"\n },\n \"cols\": 3,\n \"rows\": 6\n}\n[/block]\n### Worker Components\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Metric\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"h-3\": \"Version Introduced\",\n \"0-0\": \"Notify Task\\n(worker.task.app.tasks.notify)\",\n \"0-1\": \"timer\",\n \"0-2\": \"Time taken for the worker to send a notification\",\n \"0-3\": \"4.4.0\",\n \"1-0\": \"Upload Processor Task\\n(worker.task.app.tasks.upload_processor.UploadProcessorTask)\",\n \"1-1\": \"timer\",\n \"1-2\": \"Time taken to process an uploaded report\",\n \"1-3\": \"4.4.0\",\n \"2-0\": \"Team Sync Task\\n(worker.task.app.tasks.sync_teams.SyncTeams)\",\n \"2-1\": \"timer\",\n \"2-2\": \"Time taken to sync teams\",\n \"2-3\": \"4.4.0\",\n \"3-0\": \"Upload Task\\n(worker.task.app.tasks.upload.Upload)\",\n \"3-1\": \"timer\",\n \"3-2\": \"Time taken to retrieve a raw uploaded report from the archive\",\n \"4-0\": \"Repo Sync\\n(worker.task.app.tasks.sync_repos.SyncRepos)\",\n \"4-1\": \"timer\",\n \"4-2\": \"Time taken to sync repos from the Git provider\",\n \"3-3\": \"4.4.0\",\n \"4-3\": \"4.4.0\",\n \"5-0\": \"PR Sync Task\\n(worker.task.app.tasks.pulls.Sync)\",\n \"5-2\": \"Time taken to complete a PR notification\",\n \"5-1\": \"timer\",\n \"5-3\": \"4.4.0\",\n \"6-0\": \"celery.queue.%s.len\",\n \"6-1\": \"guage\",\n \"6-2\": \"Length of various upload queues. This is a very important set of metrics, and are used to indicate the length of currently active jobs that are remaining to be processed by Codecov at any given time. Ideally, the length of any of these queues should be at or near 0. %s can represent main Celery queue, \\\"celery\\\", Uploads queue \\\"uploads\\\" or New tasks queue \\\"new_tasks\\\"\",\n \"6-3\": \"4.4.0\"\n },\n \"cols\": 3,\n \"rows\": 7\n}\n[/block]\nComplete list of available metrics for self hosted customers can be obtained from your account rep.","order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"createdAt":"2020-05-04T21:18:39.317Z","updatedAt":"2021-05-17T19:20:23.890Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272535","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":"604a3fa3d6d5f0008027258d","previousSlug":"","slugUpdatedAt":"2021-01-08T07:17:35.204Z"},{"_id":"604a3fa3d6d5f0008027256a","excerpt":"","isReference":false,"project":"57b33b5ec9a4551700b969a5","sync_unique":"","version":"604a3fa3d6d5f0008027258e","body":"[block:api-header]\n{\n \"title\": \"Introduction\"\n}\n[/block]\nCodecov Self-Hosted stores uploaded coverage reports in a persistent archive. This archive is optional, but much of Codecov's more advanced functionality -- such as overlaying coverage on diffs -- isn't possible without using it. \n\nStarting with version 4.4.0, the archive is supported using [minio](https://minio.io/), which provides an S3-like abstraction to any underlying storage. This allows Codecov to support a myriad of storage back ends that can allow you to tailor report archival directly to your needs and internal requirements. \n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Cloud Storage is supported by Codecov Self-Hosted v4.4.4 or newer\",\n \"body\": \"Codecov Self-Hosted versions 4.4.0 to 4.4.3 do not support S3, Google Cloud Storage, etc as possible storage backends. If you're using one of these versions and wish to leverage cloud storage, it is recommended to upgrade first. \\n\\nSome minio configuration is unique to v4.4.4+. This configuration is noted inline wherever configuration is displayed below.\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Archived reports may contain source code\",\n \"body\": \"Some languages include source code with coverage reports (ex., Swift, gcov, Lua).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"General Instructions\"\n}\n[/block]\nThere are two basic steps to archive deployment with minio: \n\n1. Setup minio in accordance with your infrastructure/dev ops best practices\n2. Provide credentials to access that minio install in your `codecov.yml`\n\nThe `codecov.yml` configuration for minio is as follows:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio: \\n hash_key: \\n verify_ssl: false # use true for SSL termination on minio \\n host: minio # v4.4.4+ set to host where minio is installed \\n port: 9000\\n bucket: archive # bucket name in storage\\n region: None # region where bucket is stored (e.g., us-east1)\\n access_key_id: \\\"codecov-default-key\\\"\\n secret_access_key: \\\"codecov-default-secret\\\"\\n dsn: \\\"http://minio:9000\\\" #for v4.4.3 and below only.\\n periodic_callback_ms: 10800000 #bool or int. set to false to disable fully\\n expire_raw_after_n_days: 30 #int. default is 30 days.\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nThis is the basic configuration for minio. Each of the sections is described below:\n\n* *hash_key* - a random string used to obfuscate the repositories for which reports are associated. Once this is set and reports are uploaded, do not change it. A default is supplied if this is not specified in your `codecov.yml`\n* *verify_ssl* - set this to true if you're deploying minio [using SSL](https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls.html). \n* *host* - *v4.4.4+* the host name of your minio deployment if it is deployed separately from your Codecov Self-Hosted install. Examples include: `minio.my-company.com`. Defaults to `minio`\n* *port* - the port number where minio is accessible at `host`. Defaults to 9000\n* *region* - for cloud storage backends, this is the region where the bucket was created.\n* *access_key_id* - the key used to access the minio ui, doubles as auth for some cloud storage backends. Default is \"codecov-default-key\", we highly recommend changing this\n* *secret_access_key* - the secret used to access the minio ui, doubles as auth for some cloud storage backends. Default is \"codecov-default-secret\" we highly recommend changing this.\n* *periodic_callback_ms* - If set to an int, *N*, Codecov will attempt to periodically delete raw uploads from the archive that are older than `expire_raw_after_n_days` old every *N* ms. The default age is thirty days. Setting this to `false` will preserve all uploaded reports in perpetuity. \n* *expire_raw_after_n_days* - The number of days to keep raw uploaded reports. By default, 30 days. This setting is ignored if `periodic_callback_ms` is set to `false`. \n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Use Bucket Retention Policy\",\n \"body\": \"Although Codecov can clean up the old, raw reports as noted above, we suggest to setup retention policies in your storage provider (such as S3). This process is a lot more efficient, when handled by the storage provider natively, rather than through and external application, which can be resource intensive.\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Configuration I: Minio with Docker Volume\"\n}\n[/block]\nThe most basic deployment is to use minio as a docker container in your self-hosted `docker-compose.yml` and back it with a Docker volume. The benefit to this approach is that it's very easy to setup and is generally recommended for the trial or proof of concept stage of your Codecov Self-Hosted deployment. \n\nThis is the default setup for archive storage if you follow the Codecov Self-Hosted [Deploying with Docker](https://docs.codecov.io/docs/deploying-with-docker) install instructions. There is no need to update any configuration to use minio with a docker volume, it is the default supported use case. \n\nTo support minio with a docker volume, the following is used in `docker-compose.yml` and `codecov.yml` respectively:\n\n**docker-compose.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \" minio:\\n image: minio/minio:RELEASE.2018-08-02T23-11-36Z #earliest known working release\\n command: server /export\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=minio\\\"\\n - \\\"traefik.port=9000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /archive,/minio\\\"\\n ports:\\n - \\\"9000\\\"\\n environment:\\n - MINIO_ACCESS_KEY=codecov-default-key\\n - MINIO_SECRET_KEY=codecov-default-secret\\n volumes:\\n - archive-volume:/export\\n networks:\\n - codecov\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nConfigurable options are as follows:\n\n* *volumes* - by default Codecov Self-Hosted uses a volume created in the `docker-compose.yml` file. If you want to use a persistent storage option, such a mounted network drive, you do so by changing the volume parameter: ` - /path/to/volume:/export`\n* *MINIO_ACCESS_KEY* and *MINIO_SECRET_KEY* in this configuration these are only used as login credentials for the minio browser UI. They can be changed to anything you like as long as the appropriate changes are made in `codecov.yml` \n\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio: \\n access_key_id: \\n secret_access_key: \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nIn the default configuration, the `minio` configuration in `codecov.yml` is not needed. However, if you update the `MINIO_ACCESS_KEY` and/or `MINIO_SECRET_KEY` you should include those changed values as demonstrated above. \n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Configurations II and III assume you're using docker-compose.yml\",\n \"body\": \"Configurations II and III detail how to setup minio in your `docker-compose.yml` backed with S3 or Google Cloud Storage. You can follow the examples below, and the minio docs for other storage options, such as [Azure](https://docs.minio.io/docs/minio-gateway-for-azure.html) and [NAS](https://docs.minio.io/docs/minio-gateway-for-nas.html).\"\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Configuration II: Minio with S3\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Create your Bucket First\",\n \"body\": \"When using S3 it is important to make sure that your bucket is created before starting Codecov Self-Hosted with minio in this configuration\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"The following configuration requires Codecov Enterprise v4.4.4\",\n \"body\": \"Using minio with S3 is only available for Codecov Enterprise v4.4.4 and newer\"\n}\n[/block]\nYou can use minio with s3 by updating the `docker-compose.yml` and the `codecov.yml`. \n\n**docker-compose.yml** \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"minio:\\n image: minio/minio\\n command: gateway s3\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=minio\\\"\\n - \\\"traefik.port=9000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /archive,/minio,/\\\"\\n ports:\\n - \\\"9000\\\"\\n environment:\\n - MINIO_ACCESS_KEY=\\n - MINIO_SECRET_KEY=\\n networks:\\n - codecov\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio:\\n bucket: \\n region: \\n access_key_id: \\n secret_access_key: \\n iam_auth: \\n port: 443\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nImportant notes:\n* The port field is required and if omitted, may result in failed uploads.\n* Be sure to substitute `` with the S3 bucket you created.\n* The `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` must be set to the AWS Access Key and Secret of an account that can properly access your bucket in S3.\n* The `access_key_id` and `secret_access_key` in the codecov.yml file must also match the AWS Access Key and AWS Secret provided in the `docker-compose-yml`\n* Alternatively, `iam_auth` can be set to true when running in AWS. It will attempt to authenticate via the role associated with the instance.\n[block:api-header]\n{\n \"title\": \"Configuration III: Minio with Google Cloud Storage\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Create Your Bucket and Service Account First\",\n \"body\": \"Before restarting Codecov Enterprise to use a Google Cloud Storage bucket, make sure that bucket exists and you've created a service account that can properly access the bucket.\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"Using minio with Google Cloud Storage is only available for Codecov Self-Hosted v4.4.4 and newer.\",\n \"title\": \"The following configuration requires Codecov Enterprise v4.4.4\"\n}\n[/block]\nYou can use minio with Google Cloud Storage by updating the `docker-compose.yml` and the `codecov.yml`. \n\nIn addition to creating the bucket in GCS first, you must take the extra step of creating a Google Cloud Service Account that can access minio. You must also download the corresponding credentials.json file for the service account. [The minio documentation outlines how to do this](https://docs.minio.io/docs/minio-gateway-for-gcs.html). \n\nAfter the bucket has been created and you've downloaded the credentials.json file, you can update your docker-compose.yml and codecov.yml\n\n**docker-compose.yml** \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"minio:\\n image: minio/minio:RELEASE.2018-08-02T23-11-36Z\\n command: gateway gcs\\n labels:\\n - \\\"traefik.tags=web\\\"\\n - \\\"traefik.backend=minio\\\"\\n - \\\"traefik.port=9000\\\"\\n - \\\"traefik.frontend.rule=PathPrefix: /archive,/minio,/\\\"\\n ports:\\n - \\\"9000\\\"\\n volumes:\\n - ./path/to/your/credentials.json:/credentials.json \\n environment:\\n - GOOGLE_APPLICATION_CREDENTIALS=/credentials.json\\n - MINIO_ACCESS_KEY=\\n - MINIO_SECRET_KEY=\\n networks:\\n - codecov\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services:\\n minio: \\n hash_key: \\n verify_ssl: \\n bucket: \\n region: \\n port: 443\\n access_key_id: \\n secret_access_key: \",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nImportant notes:\n\n* Be sure to change `/` in the `docker-compose.yml` with the name of the bucket you create in GCS.\n* The `GOOGLE_APPLICATION_CREDENTIALS` envrionment variable should point to the location of the credentials file in the minio container (typically /credentials.json)\n* The `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` are only used to login to the minio UI dashboard in this configuration. \n* The port field is required and if omitted, may result in failed uploads.\n[block:api-header]\n{\n \"title\": \"Configuration IV: External Minio\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"The following configuration requires Codecov Self-Hosted v4.4.4\",\n \"body\": \"External minio is only supported with Codecov Self-Hosted v4.4.4 and newer.\"\n}\n[/block]\nFinally, it may be desired to run minio outside the default docker-compose setup. This is typically required for more advanced deployments, such as those in kubernetes. \n\n[The minio site](https://minio.io/kubernetes.html) outlines various deployment strategies that may be of interest, and it is beyond the scope of this documentation to detail each one. \n\nHowever, if you're going to deploy minio outside of docker-compose, you still need to update the `codecov.yml` file.\n\n**codecov.yml**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"services: \\n minio: \\n verify_ssl: false # use true for SSL termination on minio \\n host: minio.my-company.com \\n port: 9000\\n bucket: \\n region: \\n access_key_id: \\n secret_access_key: \\n\",\n \"language\": \"yaml\"\n }\n ]\n}\n[/block]\nImportant notes:\n\n* Set `verify_ssl` to true if you want to use minio with HTTPS. You'll need to follow [minio's TLS guide](https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls.html) to ensure your minio server is configured properly for this.\n* The `bucket` and `region` parameters can be ommitted if your hosted version of minio does not use cloud storage.\n[block:api-header]\n{\n \"title\": \"Migrating Data from an Existing Setup\"\n}\n[/block]\nIf you are using an older version of Codecov Self-Hosted and want to migrate your archived report data, please contact us at support@codecov.io, or other communication channels you may already have in place. \n\nIn nearly all cases, it is possible with some amount of effort to move legacy archival data to Codecov v4.4.x, and in some cases even migrate that data to a cloud based storage backend.","githubsync":"","order":1,"user":"5fb6f9444c67b600282c5169","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"method":"get"},"hidden":false,"next":{"pages":[],"description":""},"slug":"archiving-reports","title":"Archiving Reports","type":"basic","updates":["58ae276736bcf20f00006b8d","5fb6fc802b2412004cbb633a","5fd78a171328fc001895f601","60dcdc3aad49f100109b9f84"],"__v":4,"category":"604a3fa3d6d5f00080272535","createdAt":"2016-09-13T13:32:39.492Z","link_external":false,"link_url":"","parentDoc":"604a3fa3d6d5f0008027258d","updatedAt":"2021-11-04T14:21:39.445Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-11-19T21:31:18.230Z"},{"_id":"604a3fa3d6d5f00080272569","excerpt":"","isReference":false,"order":2,"slug":"database-backups","sync_unique":"","updates":["58ae26f723d64e0f00211413"],"api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":""},"githubsync":"","link_url":"","next":{"description":"","pages":[]},"body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Create a Backup\"\n}\n[/block]\nThe script below will run a on-off container that will run `pg_dump` and write the results to the file `backup.db`. This process could take a while, depending on the size of the database.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker run -it --rm --link codecov-postgres:postgres postgres pg_dump -Fc -h postgres -U postgres > backup.db\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Recover From a Backup\"\n}\n[/block]\nThe script below is used to run a on-off container with the backup file mounted. `pg_restore` will run with 2 processes.\n\nConcerning `-j2`, the optimal value for this option depends on the hardware setup of the server, of the client, and of the network. Factors include the number of CPU cores, and the disk setup. A good place to start is the number of CPU cores on the server, but values larger than that can also lead to faster restore times in many cases. Of course, values that are too high will lead to decreased performance because of thrashing.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"docker run -it --rm -v \\\"$PWD/backup.db:/backup.db\\\" --link codecov-postgres:postgres postgres pg_restore -h postgres -U postgres -j2 /backup.db\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","category":"604a3fa3d6d5f00080272535","type":"basic","version":"604a3fa3d6d5f0008027258e","link_external":false,"project":"57b33b5ec9a4551700b969a5","hidden":false,"parentDoc":"604a3fa3d6d5f0008027258d","title":"Database Backups","user":"57b33af9eeec08220094ea97","__v":1,"createdAt":"2016-08-18T11:44:03.620Z","updatedAt":"2019-12-06T17:00:07.756Z","metadata":{"title":"","description":"","image":[]}}]},{"_id":"604a3fa3d6d5f00080272568","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"settings":"","url":"","method":"get"},"body":"On this page, you can find some helpful pointers on working with Codecov Self-Hosted.\n[block:api-header]\n{\n \"title\": \"Security\"\n}\n[/block]\nIn line with industry best practices, we recommend placing your self-hosted install of Codecov behind your company's firewall, or otherwise perform other access controls such that it is only accessible by trusted staff and employees.\n\nWe recommend periodically restarting services to clear any memory leaks, and refresh the worker tasks. We recommend doing this daily or, at the very least, weekly.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Setup a Codecov Bot\"\n}\n[/block]\nSee [Team Bot](doc:team-bot).\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Use your bash uploader\"\n}\n[/block]\nYour Codecov self-hosted includes a bash uploader that is a stable version, and should be used for all applicable uploading.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"YES: bash <(curl -s https://codecov.mydomain.com/bash)\\n NO: bash <(curl -s https://codecov.io/bash) -u http://codecov.mydomain.com\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Use Global Upload Tokens\"\n}\n[/block]\nhttp://docs.codecov.io/docs/configuration#section-global-upload-tokens\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Setup Report Archiving\"\n}\n[/block]\n[Archiving Reports](doc:archiving-reports).","category":"604a3fa3d6d5f00080272535","hidden":false,"updates":["58ae282223d64e0f00211416","5d48388a82bc3c00121e032e","5f43fa18965d20001196fd10","5f5a6cdaf4e625001f09e735","5fd78a5a660285006c9f1b90"],"user":"5b47e58599e0430003d8e823","title":"Self-Hosted Best Practices","version":"604a3fa3d6d5f0008027258e","excerpt":"","githubsync":"","link_external":false,"link_url":"","order":4,"sync_unique":"","parentDoc":null,"slug":"best-practices","type":"basic","__v":5,"createdAt":"2016-08-20T20:24:33.635Z","isReference":false,"next":{"pages":[],"description":""},"project":"57b33b5ec9a4551700b969a5","updatedAt":"2020-12-15T14:58:51.712Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-08-23T19:35:43.458Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272565","next":{"description":"","pages":[]},"order":5,"project":"57b33b5ec9a4551700b969a5","sync_unique":"","api":{"params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"code":"{}","language":"json","status":400,"name":""}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"body":"## What is Codecov Self-Hosted?\nCodecov Self-Hosted is the on-premise, privately hosted version of Codecov.io. It integrates with many git service providers, such as [Github](https://github.com), [Github Enterprise](https://enterprise.github.com), [Gitlab](https://about.gitlab.com/features/#community), [Gitlab Enterprise](https://about.gitlab.com/features/#enterprise) and [Bitbucket](https://bitbucket.org/). All the great features and metrics found on Codecov.io are available in Codecov Self-Hosted.\n\n## How is Codecov Self-Hosted different from Codecov.io?\nCodecov Self-Hosted is for running Codecov in a private environment behind your firewall, or in your local network. Use Codecov Self-Hosted when you need complete control over repository, project information, and coverage reports.\n\n## How much does Codecov Self-Hosted cost?\nCodecov Self-Hosted is priced based on the number of users accessing Codecov \"Seats\", with purchases starting at $50,000 USD annually. The current per seat price for Codecov Self-Hosted can be found here: https://about.codecov.io/pricing\n\n## How many seats do I need, and who needs seats?\nSeats must be purchased for each individual in your organization that will have a Codecov Self-Hosted user account, as well as developers who author PRs with Codecov coverage reports included. This includes developers, project managers, designers, and other collaborators.\n\n## What payment options are available?\nCheck, bank wire transfer, and ACH are accepted for all transaction amounts. We accept payment with credit card on a case-by-case basis. Please [contact us](mailto:enterprise@codecov.io) for further inquiring, or if you have a special request.\n\n## How is Codecov Self-Hosted licensed?\nCodecov Self-Hosted is licensed under a subscription model. [Seats](https://github.com/codecov/self-hosted/wiki/Frequently-asked-questions#how-much-does-codecov-self-hosted-cost) are purchased for a one-year (or longer) period which includes full support, and access to all updates and upgrades.\n\n## Can I buy a monthly license?\nNo, due to the upfront investment of on-premises deployment, our minimum contract length is one year.\n\n## How do I add more seats to my current license?\nWe will prorate your account based on when the new seat was added, during your current billing cycle.\n\n## Are there packages available for agreements under $50,000 USD?\nNo. A minimum of purchase of $50,000 USD (paid annually) is required to use Codecov Self-Hosted. We recommend Codecov.io, our hosted service, for smaller groups.\n\n## Can I use Codecov Self-Hosted to host projects on the public internet?\nYes. You may use Codecov Self-Hosted to show reports to the public internet. You may restrict login access to users whom are member to an organization/team to limit the amount of Seat Packs you'll need to purchase. Public repositories *may* be visible to the public internet without an additional charge. \n\n## Do you offer training?\n\nYes. We offer web-based training, and in-person training is included in our Premium Support Package. Please contact [self-hosted@codecov.io](mailto:self-hosted@codecov.io) to inquire.\n\n## Does the license include access to the Codecov source code?\n\nNo. We have a blend of private and public code which is available at [https://github.com/codecov](https://github.com/codecov).\n\n## How does Codecov Self-Hosted interact with my company's source code?\n\nCodecov **never stores source code**, and **never clones repositories**.\n\nCodecov uses service API's to retrieve source code and interact with the repository. \n\nCodecov uses the active user OAuth-token to query the service API, which guarantees the user has, at least, read-only access to the resource.\n\n## Does Codecov make any external http requests?\n\nCodecov will make a variety of external http connections to operate properly. There **are not any** external http connections beyond connections setup in the configuration (i.e. no phone-home or usage statistics).\n\nYou may restrict the outbound connections to notifications services. [More here](doc:configuration#section-restrict-http-connections).\n\n[block:callout]\n{\n \"type\": \"warning\",\n \"body\": \"Reselling Codecov services is prohibited without express permission of Codecov. If you are a reseller, please reach out to enterprise@codecov.io\",\n \"title\": \"Resellers\"\n}\n[/block]","link_external":false,"link_url":"","user":"5b47e58599e0430003d8e823","slug":"frequently-asked-questions-1","__v":6,"githubsync":"","hidden":false,"parentDoc":null,"updates":["58ae1fbac99ef80f00d15645","5d318d225f8e56002f9555f1","5f52839f77fc7f03d16f1e93","5f5a6eca4608140018f00c50","5fd2b61049ab5b001ef8d498","5fd3b1c70486b70049f5f9b0"],"createdAt":"2016-08-18T11:05:53.247Z","excerpt":"","isReference":false,"category":"604a3fa3d6d5f00080272535","title":"Frequently Asked Questions - Self-Hosted","type":"basic","version":"604a3fa3d6d5f0008027258e","updatedAt":"2020-12-11T21:20:38.141Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-09-04T15:54:16.487Z","children":[],"childrenPages":[]}]},{"_id":"604a3fa3d6d5f00080272536","sync":{"isSync":false,"url":""},"order":5,"slug":"site","title":"Site","__v":0,"version":"604a3fa3d6d5f0008027258e","project":"57b33b5ec9a4551700b969a5","reference":false,"createdAt":"2016-08-17T11:24:07.809Z","from_sync":false,"pages":[{"_id":"604a3fa3d6d5f00080272552","body":"","category":"604a3fa3d6d5f00080272536","githubsync":"","link_external":false,"project":"57b33b5ec9a4551700b969a5","title":"Privacy Policy","version":"604a3fa3d6d5f0008027258e","hidden":false,"next":{"pages":[],"description":""},"parentDoc":null,"slug":"privacy-policy","sync_unique":"","type":"link","user":"5b47e58599e0430003d8e823","__v":0,"excerpt":"","updates":[],"api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"createdAt":"2016-08-17T11:24:33.182Z","isReference":false,"link_url":"https://about.codecov.io/privacy/","order":0,"updatedAt":"2019-12-06T17:00:07.759Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-08T19:00:04.620Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272554","next":{"pages":[],"description":""},"order":1,"project":"57b33b5ec9a4551700b969a5","excerpt":"","link_url":"https://about.codecov.io/security/","parentDoc":null,"type":"link","updates":[],"user":"5b47e58599e0430003d8e823","version":"604a3fa3d6d5f0008027258e","createdAt":"2016-08-17T11:25:14.040Z","githubsync":"","category":"604a3fa3d6d5f00080272536","slug":"security-policy","sync_unique":"","title":"Security Policy","__v":0,"api":{"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"hidden":false,"isReference":false,"link_external":false,"body":"","updatedAt":"2019-12-06T17:00:07.760Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-03-11T22:36:48.819Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272589","metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"End User License Agreement","updates":[],"type":"link","slug":"end-user-license-agreement","excerpt":"","body":"","order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"https://about.codecov.io/eula/","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-09T19:36:15.285Z","createdAt":"2020-10-09T19:37:56.982Z","updatedAt":"2020-10-09T19:37:56.982Z","user":"5b47e58599e0430003d8e823","category":"604a3fa3d6d5f00080272536","project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","__v":0,"parentDoc":null,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272553","__v":0,"category":"604a3fa3d6d5f00080272536","title":"Terms of Use","user":"5b47e58599e0430003d8e823","version":"604a3fa3d6d5f0008027258e","body":"","githubsync":"","slug":"terms-of-use","type":"link","hidden":false,"isReference":false,"link_external":false,"link_url":"https://about.codecov.io/terms-and-conditions/","next":{"description":"","pages":[]},"api":{"params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"status":400,"name":"","code":"{}","language":"json"}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"createdAt":"2016-08-17T11:24:49.887Z","excerpt":"","sync_unique":"","updates":[],"order":3,"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","updatedAt":"2019-12-06T17:00:07.760Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-03-11T22:36:45.041Z","children":[],"childrenPages":[]}]}],"refs":[{"_id":"604a3fa3d6d5f00080272537","reference":true,"createdAt":"2016-08-18T19:43:58.298Z","order":6,"__v":0,"version":"604a3fa3d6d5f0008027258e","project":"57b33b5ec9a4551700b969a5","sync":{"url":"","isSync":false},"from_sync":false,"slug":"overview","title":"Overview","pages":[{"_id":"604a3fa3d6d5f00080272561","createdAt":"2016-08-18T19:52:39.670Z","githubsync":"","hidden":false,"link_external":false,"order":0,"slug":"authorization","updates":["5afa70170cd1eb0003c8440b","5bd36cd8475000004154c3b9","5bff1628b1fbf4000d6b0cec","5c4b6c16428f000019d73de8","5c4d8dcc394f26001f9f6d4c","5c7f2f2058b68e00149989b9","5c8c45ba168c730033ba4229","5cd6b69eff376f00634b797f","5cd6b6d33a071e000e38f05d","5d10ee47137f320045a4e83b","5d9a31acab117e0032a56d3b","5db3f0eedd4747001215d830","5dde72f82f59ed005cbae69b","5dde7394d6d4190012dae372","5ea120183d376300549b7222","5ea1212f500c5e00112c677d","60ee6bec105c3a000fa6b371","60f8ef44bf8088001b3595f4"],"body":"To access Codecov's API as an authenticated user please create an access token in Codecov. To create an access token please follow these directions:\n\n1. Navigate to your personal (not org) account page by clicking on your avatar (top right corner) then **Settings**\n2. Click on **Access** on the left side menu\n3. Click on **Generate Token** button\n4. Type in a token name and click **Generate**\n5. Use this token in your API requests as stated below.\n\nYou can pass the token in the query params or in the request headers as seen in the two examples below.\n\nUsing the query string (not as secure, due to visible token)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET https://codecov.io/api/pub/{gh|gl|bb}/{owner}/{repo}/settings?access_token=\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nUsing the headers (recomended method)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -X GET https://codecov.io/api/pub/{gh|gl|bb}/{owner}/{repo}/settings \\\\\\n -H 'Authorization: {token}'\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","category":"604a3fa3d6d5f00080272537","parentDoc":null,"project":"57b33b5ec9a4551700b969a5","sync_unique":"","user":"5fd903caaecebd0018491bd5","excerpt":"","type":"basic","version":"604a3fa3d6d5f0008027258e","__v":18,"api":{"params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"isReference":true,"link_url":"","next":{"pages":[],"description":""},"title":"Authorization","updatedAt":"2022-03-09T18:04:15.495Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-07-14T04:28:57.941Z","deprecated":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272562","link_external":false,"order":1,"parentDoc":null,"title":"Pagination","user":"57b33af9eeec08220094ea97","category":"604a3fa3d6d5f00080272537","hidden":false,"link_url":"","project":"57b33b5ec9a4551700b969a5","slug":"pagination","type":"basic","updates":["5b03c35d96d0ae0003babb03","5c533835f572cc002c1a6591","5c8c461791fdc7003fbbe429","5d460b7b596e9f0012d03dca","6105f58656b32500778f8b6c"],"__v":5,"githubsync":"","createdAt":"2016-08-20T19:31:28.753Z","sync_unique":"","body":"Resources that return variable length of data will be paginated. Page and number of entries are stated in the `meta` as seen below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"meta\\\": {\\n \\\"status\\\": 200,\\n \\\"limit\\\": 20,\\n \\\"page\\\": 1\\n }\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\nTo request more pages please append the query param `page` like this:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/commits?page=2\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nYou can also limit the number of entries like this:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/pulls?limit=1\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","isReference":true,"next":{"pages":[],"description":""},"version":"604a3fa3d6d5f0008027258e","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"method":"get"},"excerpt":"","updatedAt":"2019-12-06T17:00:07.763Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-08-01T01:07:57.005Z","children":[],"childrenPages":[]}]},{"_id":"604a3fa3d6d5f00080272538","version":"604a3fa3d6d5f0008027258e","title":"Objects","from_sync":false,"order":7,"slug":"objects","project":"57b33b5ec9a4551700b969a5","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-20T19:44:19.739Z","__v":0,"pages":[{"_id":"604a3fa3d6d5f00080272573","sync_unique":"","__v":5,"order":0,"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"next":{"pages":[],"description":""},"type":"basic","user":"57b33af9eeec08220094ea97","category":"604a3fa3d6d5f00080272538","githubsync":"","isReference":true,"link_url":"","slug":"totals","title":"Totals","body":"Many Codecov responses include a totals object. The format of this object is outlined below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"totals\\\": {\\n \\\"c\\\": \\\"70.00000\\\", // coverage ratio\\n \\\"f\\\": 2,\\t\\t\\t // files count\\n \\\"n\\\": 10, // lines count\\n \\\"h\\\": 7, // hits count\\n \\\"m\\\": 2, // missed count\\n \\\"p\\\": 1, // partials count\\n \\\"b\\\": 3, // branches count\\n \\\"d\\\": 0, // methods count\\n \\\"M\\\": 0, // messages count\\n \\\"s\\\": 3 // sessions count\\n }\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\nIn the case of comparing commits, a diff array may also be returned, It is defined as follows:\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"\\\"diff\\\": [\\n1,\\t\\t\\t\\t\\t//files count\\n0, \\t\\t\\t\\t\\t//lines count\\n0,\\t\\t\\t\\t\\t//hits count\\n0,\\t\\t\\t\\t\\t//misses count\\n0,\\t\\t\\t\\t\\t//partials count\\nnull,\\t\\t\\t\\t\\t//coverage (null or number)\\n0,\\t\\t\\t\\t\\t//branches count\\n0,\\t\\t\\t\\t\\t//methods count\\n0,\\t\\t\\t\\t\\t//messages count\\n0,\\t\\t\\t\\t\\t//sessions count\\nnull,\\t\\t\\t\\t\\t//complexity (null or number)\\nnull,\\t\\t\\t\\t\\t//complexity_total (null or number)\\n,0],\\t\\t\\t\\t//diff\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\nThe coverage, complexity, and complexity_total values will be `null` if the diff contains a lines count of zero.","createdAt":"2016-08-20T19:44:28.942Z","excerpt":"","hidden":false,"link_external":false,"updates":["5bfd910d540bfa003f08fc48","5bfd9155cef5cb00b1115075","5c33028d51573c001382bcb7","5c80376f7c748500622c6ad4","5e01b3a306759700353585d7"],"version":"604a3fa3d6d5f0008027258e","updatedAt":"2019-12-06T17:00:07.763Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272574","updates":["57d1a2f765042a17006684b1","57d1a31e65042a17006684b2","612c7ed7b32bf10065394f45","612cc681012eee01b2edf2c4"],"user":"57b33af9eeec08220094ea97","__v":2,"category":"604a3fa3d6d5f00080272538","githubsync":"","hidden":false,"title":"Author","isReference":true,"next":{"pages":[],"description":""},"project":"57b33b5ec9a4551700b969a5","version":"604a3fa3d6d5f0008027258e","slug":"author","type":"basic","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"method":"get"},"link_external":false,"order":1,"parentDoc":null,"body":"Many Codecov responses include an authors object. The format of this object is outlined below.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"author\\\": {\\n \\\"service\\\": \\\"github\\\",\\n \\\"name\\\": \\\"Gafsi\\\",\\n \\\"email\\\": \\\"hello@codecov.io\\\",\\n \\\"username\\\": \\\"codecov\\\",\\n \\\"service_id\\\": \\\"12345\\\"\\n }\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","createdAt":"2016-08-20T19:45:14.752Z","excerpt":"","link_url":"","sync_unique":"","updatedAt":"2019-12-06T17:00:07.764Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-08-29T20:01:31.464Z","children":[],"childrenPages":[]}]},{"_id":"604a3fa3d6d5f00080272539","project":"57b33b5ec9a4551700b969a5","from_sync":false,"__v":0,"version":"604a3fa3d6d5f0008027258e","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-17T17:49:19.111Z","order":8,"slug":"teams","title":"Resources","pages":[{"_id":"604a3fa3d6d5f0008027256b","updates":["5c46997ce111b501b70965db","5d10f0d98c916d001f938ef4"],"hidden":false,"isReference":true,"link_external":false,"link_url":"","title":"Teams","type":"basic","body":"[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"List teams\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Get a single team\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]","category":"604a3fa3d6d5f00080272539","githubsync":"","next":{"pages":[],"description":""},"slug":"teams","version":"604a3fa3d6d5f0008027258e","user":"57b33af9eeec08220094ea97","__v":2,"api":{"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"createdAt":"2016-08-18T19:39:56.166Z","excerpt":"","order":0,"parentDoc":null,"sync_unique":"","project":"57b33b5ec9a4551700b969a5","updatedAt":"2019-12-06T17:00:07.765Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027256c","__v":3,"excerpt":"","category":"604a3fa3d6d5f00080272539","next":{"pages":[],"description":""},"project":"57b33b5ec9a4551700b969a5","slug":"repositories","updates":["5c53389fce8f400224514ed0","5cd6b6f76f04a200bb7f2431","612c80f3d17f86006b739712"],"user":"5b95e8b206ca8a00031f1401","githubsync":"","isReference":true,"link_external":false,"parentDoc":null,"title":"Repositories","type":"basic","version":"604a3fa3d6d5f0008027258e","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"method":"get"},"body":"[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"List repositories\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"repos\\\": [\\n {\\n \\\"fork\\\": null,\\n \\\"name\\\": \\\"repo-name\\\",\\n \\\"language\\\": null,\\n \\\"cache\\\": {\\n \\\"yaml\\\": \\\"codecov.yml\\\",\\n \\\"commit\\\": {\\n \\\"author\\\": {\\n \\\"username\\\": \\\"\\\",\\n \\\"service_id\\\": \\\"\\\",\\n \\\"name\\\": \\\"\\\",\\n \\\"service\\\": \\\"\\\",\\n \\\"email\\\": \\\"\\\"\\n },\\n \\\"timestamp\\\": \\\"2018-10-08T02:50:34\\\",\\n \\\"totals\\\": [\\n //array of coverage totals\\n ],\\n \\\"commitid\\\": \\\"\\\",\\n \\\"ci_passed\\\": null,\\n \\\"message\\\": \\\"Commit Message\\\"\\n }\\n },\\n \\\"activated\\\": true,\\n \\\"private\\\": true,\\n \\\"updatestamp\\\": \\\"1970-01-01 00:00:00.000000+00:00\\\",\\n \\\"latest_commit\\\": \\\"1970-01-01 00:00:00\\\",\\n \\\"branch\\\": \\\"\\\",\\n \\\"coverage\\\": 100.00,\\n \\\"upload_token\\\": \\\"\\\",\\n \\\"repoid\\\": \\\"\\\"\\n }\\n ]\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Get a single repository\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]","createdAt":"2016-08-18T19:50:47.600Z","hidden":false,"link_url":"","order":1,"sync_unique":"","updatedAt":"2019-12-06T17:00:07.765Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-08-30T06:52:59.661Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027256d","project":"57b33b5ec9a4551700b969a5","slug":"branches","type":"basic","user":"57b33af9eeec08220094ea97","order":2,"parentDoc":null,"githubsync":"","link_external":false,"link_url":"","next":{"pages":[],"description":""},"sync_unique":"","version":"604a3fa3d6d5f0008027258e","body":"[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"List branches\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/branches\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Get a single branch\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/branch/:branch\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]","category":"604a3fa3d6d5f00080272539","api":{"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"excerpt":"","hidden":false,"isReference":true,"title":"Branches","updates":["5d10eeca1b83310018c90443"],"__v":1,"createdAt":"2016-08-18T19:40:01.171Z","updatedAt":"2020-05-14T15:39:39.492Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027256e","sync_unique":"","title":"Pull Requests","user":"57b33af9eeec08220094ea97","body":"[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"List pull requests\"\n}\n[/block]\nEach returned pull request will include the pull request base and head commits. Pagination applied.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/pulls\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n## Parameters\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Param\",\n \"h-1\": \"Description\",\n \"h-2\": \"Description\",\n \"0-0\": \"`state`\",\n \"0-1\": \"Filter the list of pulls returned based on the pull request state determined by the service provider.\\nChoose: `all`, `open`, `closed`, `merged`. **Default**: `open`\",\n \"0-2\": \"\",\n \"1-0\": \"`sort`\",\n \"1-1\": \"Sort the query results.\\nChoose: `pullid`, `impact`, `updatestamp`. **Default**: `pullid`\",\n \"1-2\": \"\",\n \"2-0\": \"`order`\",\n \"2-1\": \"Specify the sorting order.\\nChoose: `desc`, `asc`. **Default**: `desc`\",\n \"2-2\": \"\"\n },\n \"cols\": 2,\n \"rows\": 3\n}\n[/block]\n## Result\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"pulls\\\": [\\n {\\n \\\"pullid\\\": 1915,\\n \\\"author\\\": \\\"\\\",\\n \\\"title\\\": \\\"pull request title\\\",\\n \\\"updatestamp\\\": \\\"2016-08-19 14:38:26.970575+00:00\\\",\\n \\\"state\\\": \\\"open\\\",\\n \\\"diff\\\": \\\"\\\",\\n \\\"totals\\\": {\\n \\\"base\\\": \\\"\\\",\\n \\\"head\\\": \\\"\\\"\\n },\\n \\\"head\\\": {\\n \\\"message\\\": \\\"tip of pull request commit message\\\",\\n \\\"totals\\\": \\\"\\\",\\n \\\"ci_passed\\\": true,\\n \\\"timestamp\\\": \\\"2016-08-19 14:26:02\\\",\\n \\\"commitid\\\": \\\"df150e4be50ae09263107c3ea43d1a35f055bb71\\\",\\n \\\"author\\\": \\\"\\\"\\n },\\n \\\"base\\\": {\\n \\\"message\\\": \\\"pull request base commit message\\\",\\n \\\"totals\\\": \\\"\\\",\\n \\\"ci_passed\\\": true,\\n \\\"timestamp\\\": \\\"2016-08-17 22:22:32\\\",\\n \\\"commitid\\\": \\\"010e063270be37cfa8547ccfb9717e5d874c88a8\\\",\\n \\\"author\\\": \\\"\\\"\\n }\\n }\\n ]\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Get a single pull request\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/pull/1\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","parentDoc":null,"next":{"pages":[],"description":""},"slug":"pull-requests","updates":["5da28c0763bce1002c6ea5fd"],"version":"604a3fa3d6d5f0008027258e","createdAt":"2016-08-18T19:40:25.187Z","hidden":false,"isReference":true,"project":"57b33b5ec9a4551700b969a5","type":"basic","__v":1,"api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"code":"{}","language":"json","status":400,"name":""}]},"settings":"","url":"","method":"get"},"order":3,"link_external":false,"link_url":"","category":"604a3fa3d6d5f00080272539","excerpt":"","githubsync":"","updatedAt":"2019-12-06T17:00:07.766Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027256f","slug":"commits","sync_unique":"","__v":2,"api":{"url":"","auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"name":"","code":"{}","language":"json"},{"code":"{}","language":"json","status":400,"name":""}]},"settings":""},"createdAt":"2016-08-18T19:40:31.322Z","next":{"pages":[],"description":""},"order":4,"version":"604a3fa3d6d5f0008027258e","category":"604a3fa3d6d5f00080272539","hidden":false,"link_url":"","project":"57b33b5ec9a4551700b969a5","title":"Commits","type":"basic","user":"5d2df7be2fc9ec00552ec020","excerpt":"","isReference":true,"parentDoc":null,"updates":["5ae9eeeec579620003fb7365","5e0faab06c338d03f351dd22"],"body":"[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"List commits\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/commits\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n## Parameters\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Param\",\n \"0-0\": \"`from`\",\n \"h-1\": \"Type\",\n \"0-1\": \"any date and/or time string in yyyy-MM-dd HH:mm:ss format\",\n \"0-2\": \"Only query commits starting from this date\",\n \"1-0\": \"`to`\",\n \"1-1\": \"any date and/or time string in yyyy-MM-dd HH:mm:ss format\",\n \"1-2\": \"Only query commits up to this date\"\n },\n \"cols\": 3,\n \"rows\": 2\n}\n[/block]\n## Results\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"commits\\\": [\\n {\\n \\\"branch\\\": \\\"master\\\",\\n \\\"merged\\\": null,\\n \\\"message\\\": \\\"pretty commit message\\\",\\n \\\"deleted\\\": null,\\n \\\"totals\\\": \\\"\\\",\\n \\\"pullid\\\": null,\\n \\\"ci_passed\\\": true,\\n \\\"commitid\\\": \\\"30eb4733ba830d48b02a90285950c9b4db48c35d\\\",\\n \\\"timestamp\\\": \\\"2016-08-18 17:32:25\\\",\\n \\\"author\\\": \\\"\\\"\\n }\\n ]\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Get a single commit\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/commit/:sha\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Force notifications to run\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"POST /api/gh/:owner/:repo/commit/:sha\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\nThis endpoint will force the commit to run the notification job and update the internal commit state.\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Compare two commits\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/compare/:base...:head\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"get\",\n \"title\": \"Get folder totals\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"GET /api/gh/:owner/:repo/tree/:ref/:path\",\n \"language\": \"text\",\n \"name\": \"Request\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"commit\\\": {\\n \\\"folder_totals\\\": \\n }\\n}\",\n \"language\": \"json\",\n \"name\": \"Result\"\n }\n ]\n}\n[/block]","githubsync":"","link_external":false,"updatedAt":"2020-03-05T13:10:24.351Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f0008027257d","slug":"upload","api":{"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"method":"get"},"category":"604a3fa3d6d5f00080272539","link_url":"","next":{"pages":[],"description":""},"title":"Upload","body":"Upload versions 1 and 3 are depreciated.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Upload query - as seen as `$query` below\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`commit`\",\n \"h-1\": \"Required\",\n \"h-0\": \"Argument\",\n \"0-1\": \"**Yes**\",\n \"h-2\": \"Description\",\n \"0-2\": \"The destination commit sha for the report.\",\n \"1-0\": \"`token`\",\n \"1-1\": \"**Yes**\",\n \"1-2\": \"A UUID token used to identify the project.\",\n \"2-0\": \"`branch`\",\n \"2-1\": \"No\",\n \"2-2\": \"The target branch for the report. This value may be overridden during the Codecov discovery process.\",\n \"3-0\": \"`build`\",\n \"5-0\": \"`build_url`\",\n \"6-0\": \"`name`\",\n \"7-0\": \"`slug`\",\n \"8-0\": \"`yaml`\",\n \"9-0\": \"`service`\",\n \"10-0\": \"`flags`\",\n \"11-0\": \"`pr`\",\n \"3-1\": \"No\",\n \"5-1\": \"No\",\n \"6-1\": \"No\",\n \"7-1\": \"No\",\n \"8-1\": \"No\",\n \"9-1\": \"No\",\n \"10-1\": \"No\",\n \"11-1\": \"No\",\n \"3-2\": \"The build number provided by your CI service.\",\n \"5-2\": \"The http url to link back to your CI provider.\",\n \"6-2\": \"A custom name for this specific upload.\",\n \"7-2\": \"The `owner/repo` slug name of the project.\",\n \"8-2\": \"The relative path to the `codecov.yml` in this project.\",\n \"9-2\": \"The CI service name. See below for acceptable values.\",\n \"10-2\": \"Used for [Flags](doc:flags). Can be one or more flags. E.g., `flags=unit` or `flags=unit,java`\",\n \"11-2\": \"The pull request number this commit is currently found in.\",\n \"4-0\": \"`job`\",\n \"4-1\": \"No\",\n \"4-2\": \"The job number provided by your CI service.\"\n },\n \"cols\": 3,\n \"rows\": 12\n}\n[/block]\nList of acceptable CI service names.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"[\\n \\\"travis\\\",\\n \\\"buildbot\\\",\\n \\\"circleci\\\",\\n \\\"buddybuild\\\",\\n \\\"solano\\\",\\n \\\"teamcity\\\",\\n \\\"appveyor\\\",\\n \\\"wercker\\\",\\n \\\"magnum\\\",\\n \\\"shippable\\\",\\n \\\"codeship\\\",\\n \\\"drone.io\\\",\\n \\\"jenkins\\\",\\n \\\"semaphore\\\",\\n \\\"gitlab\\\",\\n \\\"bamboo\\\",\\n \\\"snap\\\",\\n \\\"buildkite\\\",\\n \\\"bitrise\\\",\\n \\\"greenhouse\\\",\\n \\\"custom\\\"\\n]\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Uploaded report content - as seen as `@reports` below\"\n}\n[/block]\nThe uploaded content can be any number of coverage report formats wrapped up into the same file.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"touch reports\\ncat coverage.xml >> reports\\necho '<<<<<< EOF' >> reports\\ncat lcov.info >> reports\\necho '<<<<<< EOF' >> reports\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nThe resulting file at `reports` will look like the following.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"\\n\\n ..data..\\n\\n<<<<<< EOF\\nTN:\\nSF:file.js\\n..data..\\n<<<<<< EOF\",\n \"language\": \"text\",\n \"name\": \"reports\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Codecov JSON report format\"\n}\n[/block]\nCodecov also supports a [custom JSON coverage file](doc:codecov-custom-coverage-format) format.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Version 2 - Direct upload\"\n}\n[/block]\nUpload v2 is used to upload report contents directly to Codecov. The reports are included in the upload body.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -X POST \\\\\\n --data-binary @reports \\\\\\n \\\"https://codecov.io/upload/v2?${query}\\\"\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Version 4 - Upload to S3\"\n}\n[/block]\nVersion 4 is recommended because it uploads and archives the reports to S3 immediately. Codecov's web server will not get the report data directly, which can cause issues if the file size of the uploaded report large (generally greater than 45MB).\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# tell codecov we have an upload\\nres=$(curl -sX POST -H 'Accept: text/plain' \\\"https://codecov.io/upload/v4?${query}\\\")\\n\\ncc_url=$(echo \\\"$res\\\" | sed -n 1p) # where the reports will end up in Codecov UI\\ns3_url=$(echo \\\"$res\\\" | sed -n 2p) # this url is temporary. it will expire\\n\\n# upload reports to s3\\ncurl -fisX PUT --data-binary @reports \\\\\\n -H 'Content-Type: text/plain' \\\\\\n -H 'x-amz-storage-class: REDUCED_REDUNDANCY' \\\\\\n \\\"$s3_url\\\"\\n\\necho \\\"View reports at $cc_url\\\"\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Version 5 - Fetched\"\n}\n[/block]\nVersion 5 is used when the report can be downloaded at a url. Codecov will fetch the report at time of processing.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"reports=\\\"https://company.com/assets/coverage/...\\\"\\ncurl -X POST \\\\\\n --data-binary $reports \\\\\\n \\\"https://codecov.io/upload/v5?${query}&url=${reports}\\\"\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","githubsync":"","isReference":true,"parentDoc":null,"project":"57b33b5ec9a4551700b969a5","updates":["5bc75879b40831004fe09276","5e10bf13a72cea00570b986e"],"user":"5d2df7be2fc9ec00552ec020","excerpt":"","hidden":false,"link_external":false,"order":5,"sync_unique":"","type":"basic","version":"604a3fa3d6d5f0008027258e","__v":2,"createdAt":"2017-02-18T18:57:06.919Z","updatedAt":"2020-10-19T16:57:48.597Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-10-18T18:25:01.201Z","children":[],"childrenPages":[]}]},{"_id":"604a3fa3d6d5f0008027253a","version":"604a3fa3d6d5f0008027258e","order":9,"slug":"compare","title":"Graphs","__v":0,"project":"57b33b5ec9a4551700b969a5","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-17T17:49:52.696Z","from_sync":false,"pages":[{"_id":"604a3fa3d6d5f00080272570","next":{"pages":[],"description":""},"parentDoc":null,"__v":3,"excerpt":"","githubsync":"","isReference":true,"link_external":false,"link_url":"","updates":["5dc9ab98440f9400624b9ee7","60ee6c66b98186007af1eee9","60f8eef191b3d60010ea14c4"],"user":"57b33af9eeec08220094ea97","hidden":false,"slug":"sunburst","body":"The coverage sunburst is a graph of the project in a multi-level pie chart. The color represents the coverage of the project, folder, and files. The innermost circle is the entire project the next slices are folders leading to the outermost slices which are files.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"HTML\"\n}\n[/block]\nFrom your project dashboard you will find an interactive sunburst graph.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/732734d-Screen_Recording_2016-08-20_at_10.50_AM.gif\",\n \"Screen Recording 2016-08-20 at 10.50 AM.gif\",\n 566,\n 478,\n \"#c8a926\"\n ],\n \"caption\": \"Click slices to zoom in. Click center to zoom out. `shift+click` to navigate to a file in Codecov.\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"SVG\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# tip of default branch\\nGET /gh/:owner/:repo/graphs/sunburst.svg?token=:graph_token\\n\\n# tip of branch\\nGET /gh/:owner/:repo/branch/:branch/graphs/sunburst.svg?token=:graph_token\\n\\n# tip of pull\\nGET /gh/:owner/:repo/pull/:id/graphs/sunburst.svg?token=:graph_token\\n\\n# specific commit\\nGET /gh/:owner/:repo/commit/:sha/graphs/sunburst.svg?token=:graph_token\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"\",\n \"language\": \"html\"\n }\n ]\n}\n[/block]\n## Result\n\nBelow is an example SVG output.\n[block:html]\n{\n \"html\": \"\"\n}\n[/block]\n## Parameters\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Param\",\n \"h-1\": \"Default\",\n \"h-2\": \"Description\",\n \"h-3\": \"\",\n \"0-0\": \"`width`\",\n \"1-0\": \"`height`\",\n \"2-0\": \"`border_size`\",\n \"3-0\": \"`border_color`\",\n \"0-1\": \"`300`\",\n \"1-1\": \"`300`\",\n \"2-1\": \"`1`\",\n \"3-1\": \"`white`\"\n },\n \"cols\": 2,\n \"rows\": 4\n}\n[/block]","category":"604a3fa3d6d5f0008027253a","sync_unique":"","type":"basic","version":"604a3fa3d6d5f0008027258e","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","method":"get"},"createdAt":"2016-08-20T11:58:04.832Z","order":0,"project":"57b33b5ec9a4551700b969a5","title":"Sunburst","updatedAt":"2019-11-11T18:42:11.632Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-07-13T19:21:42.144Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272571","githubsync":"","link_external":false,"link_url":"","next":{"pages":[],"description":""},"sync_unique":"","type":"basic","updates":[],"body":"The tree graph is a block style layout of your repository. Each block represents a single file in the repository. The size of each block is the number of covered statements and methods in the file. The color is based on that files coverage. Each block includes a link to the file, which you may click to redirect to the file.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# tip of default branch\\nGET /gh/:owner/:repo/graphs/tree.svg?token=:graph_token\\n\\n# tip of branch\\nGET /gh/:owner/:repo/branch/:branch/graphs/tree.svg?token=:graph_token\\n\\n# tip of pull\\nGET /gh/:owner/:repo/pull/:id/graphs/tree.svg?token=:graph_token\\n\\n# specific commit\\nGET /gh/:owner/:repo/commit/:sha/graphs/tree.svg?token=:graph_token\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\nClick on a file below to navigate to the file's coverage in Codecov.\n[block:html]\n{\n \"html\": \"\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"\",\n \"language\": \"html\"\n }\n ]\n}\n[/block]\n## Parameters\n\nProvide query arguments to customize the graph.\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`width`\",\n \"0-1\": \"`500`\",\n \"h-1\": \"Default\",\n \"h-0\": \"Param\",\n \"1-0\": \"`height`\",\n \"1-1\": \"`500`\",\n \"2-0\": \"`border_size`\",\n \"2-1\": \"`1`\",\n \"3-0\": \"`border_color`\",\n \"3-1\": \"`white`\"\n },\n \"cols\": 2,\n \"rows\": 4\n}\n[/block]","category":"604a3fa3d6d5f0008027253a","createdAt":"2016-08-20T15:03:35.324Z","hidden":false,"parentDoc":null,"slug":"tree","api":{"apiSetting":null,"auth":"required","params":[],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{}"},{"status":400,"name":"","code":"{}","language":"json"}]},"settings":"","url":"","method":"get"},"isReference":true,"project":"57b33b5ec9a4551700b969a5","title":"Tree","user":"5b47e58599e0430003d8e823","version":"604a3fa3d6d5f0008027258e","__v":0,"excerpt":"","order":1,"updatedAt":"2019-12-06T17:00:07.772Z","metadata":{"title":"","description":"","image":[]},"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2020-07-29T17:27:07.580Z","children":[],"childrenPages":[]},{"_id":"604a3fa3d6d5f00080272572","githubsync":"","link_external":false,"slug":"icicle","__v":1,"createdAt":"2016-08-20T15:19:34.625Z","parentDoc":null,"project":"57b33b5ec9a4551700b969a5","type":"basic","api":{"params":[],"results":{"codes":[{"code":"{}","language":"json","status":200,"name":""},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"","apiSetting":null,"auth":"required","method":"get"},"hidden":false,"next":{"pages":[],"description":""},"order":2,"title":"Icicle","user":"57b33af9eeec08220094ea97","updates":["5da286cf7de9260073e44eee"],"version":"604a3fa3d6d5f0008027258e","body":"The icicle graph exposes your project in a top down approach. The top slice is the entire project. Each child slice, moving down, is a folder leading to the files themselves. The size of each slice is the sum of the covered lines. The color is the based on that slices coverage ratio.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"# tip of default branch\\nGET /gh/:owner/:repo/graphs/icicle.svg?token=:graph_token\\n\\n# tip of branch\\nGET /gh/:owner/:repo/branch/:branch/graphs/icicle.svg?token=:graph_token\\n\\n# tip of pull\\nGET /gh/:owner/:repo/pull/:id/graphs/icicle.svg?token=:graph_token\\n\\n# specific commit\\nGET /gh/:owner/:repo/commit/:sha/graphs/icicle.svg?token=:graph_token\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"\",\n \"language\": \"html\"\n }\n ]\n}\n[/block]\n\n[block:html]\n{\n \"html\": \"\"\n}\n[/block]\n## Parameters\n\nProvide query arguments to customize the graph.\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`width`\",\n \"0-1\": \"`700`\",\n \"1-0\": \"`height`\",\n \"1-1\": \"`150`\",\n \"2-0\": \"`border_size`\",\n \"2-1\": \"`1`\",\n \"3-0\": \"`border_color`\",\n \"3-1\": \"`white`\"\n },\n \"cols\": 2,\n \"rows\": 4\n}\n[/block]","category":"604a3fa3d6d5f0008027253a","excerpt":"","isReference":true,"link_url":"","sync_unique":"","updatedAt":"2019-12-06T17:00:07.772Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]}]},{"_id":"604a3fa3d6d5f0008027253c","version":"604a3fa3d6d5f0008027258e","project":"57b33b5ec9a4551700b969a5","slug":"repository","sync":{"url":"","isSync":false},"reference":true,"title":"Settings","__v":0,"createdAt":"2017-01-16T22:40:16.843Z","from_sync":false,"order":10,"pages":[{"_id":"604a3fa3d6d5f00080272578","title":"Repository Settings","createdAt":"2017-01-16T22:40:29.842Z","excerpt":"","isReference":true,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"sync_unique":"","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","apiSetting":null,"auth":"required","params":[],"method":"get"},"order":0,"project":"57b33b5ec9a4551700b969a5","slug":"repository-settings","updates":["5d9a30f799410e004a22b19d","5db36d4b34b3e300349984a2","5e88acd387eef5013219900b"],"__v":3,"body":"[block:api-header]\n{\n \"type\": \"post\",\n \"title\": \"Activate Repository\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"POST /api/pub/gh/:owner/:repo/settings\\nBODY action=activate\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"post\",\n \"title\": \"Deactivate Repository\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"POST /api/pub/gh/:owner/:repo/settings\\nBODY action=deactivate\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"post\",\n \"title\": \"Regenerate Upload Token\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"POST /api/pub/gh/:owner/:repo/settings\\nBODY action=regenerate\",\n \"language\": \"shell\"\n }\n ]\n}\n[/block]","category":"604a3fa3d6d5f0008027253c","hidden":false,"version":"604a3fa3d6d5f0008027258e","githubsync":"","parentDoc":null,"type":"basic","user":"57b33af9eeec08220094ea97","updatedAt":"2019-01-29T20:05:48.275Z","metadata":{"title":"","description":"","image":[]},"children":[],"childrenPages":[]}]}]},"activeDoc":"codecov-delta","rdmd":{"baseUrl":"/","body":"The Codecov Delta (aka Codecov ∆) is our syntax for expressing coverage metrics and their impact on the scope of what is being measured.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Codecov calculations\"\n}\n[/block]\nIDEs and coverage collecting agents report coverage differently. Codecov does not conform to any standard, nor do we make any attempt to express our metrics in the exact same way the IDE, or coverage reports, may express coverage.\n\n- **hit** indicates that the source code was executed by the test suite.\n- **partial** indicates that the source code was not fully executed by the test suite; there are remaining branches that were not executed.\n- **miss** indicates that the source code was not executed by the test suite.\n\nCoverage is the ratio of `hits / (sum of hit + partial + miss)`. A code base that has 5 lines executed by tests out of 12 total lines will receive a coverage ratio of `41%` (rounding down).\n\nCodecov is a reporting tool that is intended to process any coverage report format into a format that is standard across Codecov.\n\nYou may change the configuration of how Codecov processes reports and expresses coverage information. Please review our [Codecov Yaml](doc:codecov-yaml) to learn about the configuration options.\n[block:api-header]\n{\n \"title\": \"What is Codecov Delta\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"absolute (change)\\n35% <72%> (+4%)\",\n \"language\": \"text\",\n \"name\": null\n }\n ]\n}\n[/block]\nThere are three data points in the Codecov Delta:\n1: The absolute scope. e.g., 35%.\n2: The relative scope. e.g., <72%>.\n3: The change in coverage. e.g., (+4%).\n\n## Absolute\nThe entire project's coverage. \n\nRead as `\"The entire project coverage is 35%.\"`\n\n## Relative\nCoverage concerning _only_ lines adjusted in the commit diff (aka the diff coverage)\n\nRead as `\"The lines I changed in this commit are 72% covered.\"`\nAlso read as `\"The coverage of this commit's diff is 72%.\"`\n\n## Change\nThe amount of gain or loss of coverage when compared to the commit's parent.\n\nRead as `\"This commit increased this project's coverage by 4%.\"`\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Examples\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/dfe5871-Screen_Shot_2017-01-15_at_8.32.26_AM.png\",\n \"Screen Shot 2017-01-15 at 8.32.26 AM.png\",\n 532,\n 136,\n \"#e43c94\"\n ],\n \"caption\": \"Project coverage is 84%.\\nThe commit did not adjust any tracked lines.\\nThe commit did not change the coverage ratio.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3a2f6b3-Screen_Shot_2017-01-15_at_8.56.32_AM.png\",\n \"Screen Shot 2017-01-15 at 8.56.32 AM.png\",\n 508,\n 104,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 72%.\\nThe commit diff was 100% covered.\\nThe commit did not change project coverage.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/5db8343-Screen_Shot_2017-01-15_at_8.34.24_AM.png\",\n \"Screen Shot 2017-01-15 at 8.34.24 AM.png\",\n 516,\n 112,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 60.74%.\\nCommit diff was not affected.\\nCoverage decreased by .14%.\\n*An example of [Unexpected Coverage Changes](doc:unexpected-coverage-changes)*.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3d839a3-Screen_Shot_2017-01-15_at_8.47.34_AM.png\",\n \"Screen Shot 2017-01-15 at 8.47.34 AM.png\",\n 526,\n 120,\n \"#e7f4e3\"\n ],\n \"caption\": \"Project coverage at this commit is 61%.\\nCommit diff is 100% covered.\\nCoverage increased by 1%.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f034515-Screen_Shot_2017-01-15_at_8.51.41_AM.png\",\n \"Screen Shot 2017-01-15 at 8.51.41 AM.png\",\n 528,\n 120,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 50%.\\nCommit diff is 20% covered.\\nCoverage dropped by 3%.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/51798bc-Screen_Shot_2017-01-16_at_1.54.44_PM.png\",\n \"Screen Shot 2017-01-16 at 1.54.44 PM.png\",\n 514,\n 104,\n \"#e33c93\"\n ],\n \"caption\": \"Project is 80% covered.\\nCommit diff was not affected.\\nCoverage dropped 1%.\\n*Example of [Coverage Offset](doc:coverage-offset)*.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"What is \\\"ø\\\"?\"\n}\n[/block]\n> The character `ø` represents \"not affected\" or \"no change\". This value could be found in the **** and **(change)** block of the Coverage Delta.\n\nWhen found in the **** block, it represents that the coverage diff was not concerning coverage. (e.g a commit that only adjusts lines *not* tracked by coverage.)\n\nWhen found in the **(change)** block, it represents that coverage did not change. (e.g. `0%` change. The commit did not affect project coverage.)\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Contexts\"\n}\n[/block]\nWe use the Codecov Delta throughout the app. It expresses details for the entire project, flags, diffs, folders and files. It is important to understand the context of the delta.\n\nThe absolute, relative, and change metrics refer to the context. In the example below, the Codecov Delta appears in the file headers. The Delta's metrics concern only the file itself.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b6544f2-Screen_Shot_2017-01-15_at_11.10.27_AM.png\",\n \"Screen Shot 2017-01-15 at 11.10.27 AM.png\",\n 2290,\n 186,\n \"#f3f5f2\"\n ],\n \"caption\": \"The file `reference.go` is 79% covered.\\nIn this commit there was 12 lines added which were 100% covered.\\nIt results in the file having 5% more coverage.\"\n }\n ]\n}\n[/block]","opts":{"compatibilityMode":false,"copyButtons":true,"correctnewlines":false,"markdownOptions":{"fences":true,"commonmark":true,"gfm":true,"ruleSpaces":false,"listItemIndent":"1","spacedTable":true,"paddedTable":true,"setext":true},"normalize":true,"settings":{"position":false},"theme":"light"},"terms":[],"variables":{"user":{},"defaults":[]},"dehydrated":{"toc":"","body":"

The Codecov Delta (aka Codecov ∆) is our syntax for expressing coverage metrics and their impact on the scope of what is being measured.

\n

Codecov calculations

\n

IDEs and coverage collecting agents report coverage differently. Codecov does not conform to any standard, nor do we make any attempt to express our metrics in the exact same way the IDE, or coverage reports, may express coverage.

\n
    \n
  • hit indicates that the source code was executed by the test suite.
  • \n
  • partial indicates that the source code was not fully executed by the test suite; there are remaining branches that were not executed.
  • \n
  • miss indicates that the source code was not executed by the test suite.
  • \n
\n

Coverage is the ratio of hits / (sum of hit + partial + miss). A code base that has 5 lines executed by tests out of 12 total lines will receive a coverage ratio of 41% (rounding down).

\n

Codecov is a reporting tool that is intended to process any coverage report format into a format that is standard across Codecov.

\n

You may change the configuration of how Codecov processes reports and expresses coverage information. Please review our Codecov Yaml to learn about the configuration options.

\n

What is Codecov Delta

\n
absolute &lt;relative&gt; (change)\n35% &lt;72%&gt; (+4%)\n
\n

There are three data points in the Codecov Delta:
\n1: The absolute scope. e.g., 35%.
\n2: The relative scope. e.g., &lt;72%&gt;.
\n3: The change in coverage. e.g., (+4%).

\n

Absolute

\n

The entire project&#x27;s coverage.

\n

Read as &quot;The entire project coverage is 35%.&quot;

\n

Relative

\n

Coverage concerning only lines adjusted in the commit diff (aka the diff coverage)

\n

Read as &quot;The lines I changed in this commit are 72% covered.&quot;
\nAlso read as &quot;The coverage of this commit&#x27;s diff is 72%.&quot;

\n

Change

\n

The amount of gain or loss of coverage when compared to the commit&#x27;s parent.

\n

Read as &quot;This commit increased this project&#x27;s coverage by 4%.&quot;

\n

Examples

\n
\"Project\"Project

Project coverage is 84%.
\nThe commit did not adjust any tracked lines.
\nThe commit did not change the coverage ratio.

\n
\"Project\"Project

Project coverage is 72%.
\nThe commit diff was 100% covered.
\nThe commit did not change project coverage.

\n
\"Project\"Project

Project coverage is 60.74%.
\nCommit diff was not affected.
\nCoverage decreased by .14%.
\nAn example of Unexpected Coverage Changes.

\n
\"Project\"Project

Project coverage at this commit is 61%.
\nCommit diff is 100% covered.
\nCoverage increased by 1%.

\n
\"Project\"Project

Project coverage is 50%.
\nCommit diff is 20% covered.
\nCoverage dropped by 3%.

\n
\"Project\"Project

Project is 80% covered.
\nCommit diff was not affected.
\nCoverage dropped 1%.
\nExample of Coverage Offset.

\n

What is &quot;ø&quot;?

\n
\n

The character ø represents &quot;not affected&quot; or &quot;no change&quot;. This value could be found in the and (change) block of the Coverage Delta.

\n
\n

When found in the block, it represents that the coverage diff was not concerning coverage. (e.g a commit that only adjusts lines not tracked by coverage.)

\n

When found in the (change) block, it represents that coverage did not change. (e.g. 0% change. The commit did not affect project coverage.)

\n

Contexts

\n

We use the Codecov Delta throughout the app. It expresses details for the entire project, flags, diffs, folders and files. It is important to understand the context of the delta.

\n

The absolute, relative, and change metrics refer to the context. In the example below, the Codecov Delta appears in the file headers. The Delta&#x27;s metrics concern only the file itself.

\n
\"The\"The

The file reference.go is 79% covered.
\nIn this commit there was 12 lines added which were 100% covered.
\nIt results in the file having 5% more coverage.

"}},"doc":{"metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","apiSetting":null,"params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"next":{"description":"","pages":[]},"title":"Codecov Delta","updates":["587c1f298a03182d0012d600","587c20416045ce0f0047087f","58adf17745c2240f00673edb","5bc6e6fc160184005c50a2e9","5c2780c1c6db920043d832d2","5d8407b8514f540041743b95","60c2c472edb7fb002ab5e9a1","61fafeb53d0926006a3480e8"],"type":"basic","slug":"codecov-delta","excerpt":"Understanding the numbers and syntax","body":"The Codecov Delta (aka Codecov ∆) is our syntax for expressing coverage metrics and their impact on the scope of what is being measured.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Codecov calculations\"\n}\n[/block]\nIDEs and coverage collecting agents report coverage differently. Codecov does not conform to any standard, nor do we make any attempt to express our metrics in the exact same way the IDE, or coverage reports, may express coverage.\n\n- **hit** indicates that the source code was executed by the test suite.\n- **partial** indicates that the source code was not fully executed by the test suite; there are remaining branches that were not executed.\n- **miss** indicates that the source code was not executed by the test suite.\n\nCoverage is the ratio of `hits / (sum of hit + partial + miss)`. A code base that has 5 lines executed by tests out of 12 total lines will receive a coverage ratio of `41%` (rounding down).\n\nCodecov is a reporting tool that is intended to process any coverage report format into a format that is standard across Codecov.\n\nYou may change the configuration of how Codecov processes reports and expresses coverage information. Please review our [Codecov Yaml](doc:codecov-yaml) to learn about the configuration options.\n[block:api-header]\n{\n \"title\": \"What is Codecov Delta\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"absolute (change)\\n35% <72%> (+4%)\",\n \"language\": \"text\",\n \"name\": null\n }\n ]\n}\n[/block]\nThere are three data points in the Codecov Delta:\n1: The absolute scope. e.g., 35%.\n2: The relative scope. e.g., <72%>.\n3: The change in coverage. e.g., (+4%).\n\n## Absolute\nThe entire project's coverage. \n\nRead as `\"The entire project coverage is 35%.\"`\n\n## Relative\nCoverage concerning _only_ lines adjusted in the commit diff (aka the diff coverage)\n\nRead as `\"The lines I changed in this commit are 72% covered.\"`\nAlso read as `\"The coverage of this commit's diff is 72%.\"`\n\n## Change\nThe amount of gain or loss of coverage when compared to the commit's parent.\n\nRead as `\"This commit increased this project's coverage by 4%.\"`\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Examples\"\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/dfe5871-Screen_Shot_2017-01-15_at_8.32.26_AM.png\",\n \"Screen Shot 2017-01-15 at 8.32.26 AM.png\",\n 532,\n 136,\n \"#e43c94\"\n ],\n \"caption\": \"Project coverage is 84%.\\nThe commit did not adjust any tracked lines.\\nThe commit did not change the coverage ratio.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3a2f6b3-Screen_Shot_2017-01-15_at_8.56.32_AM.png\",\n \"Screen Shot 2017-01-15 at 8.56.32 AM.png\",\n 508,\n 104,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 72%.\\nThe commit diff was 100% covered.\\nThe commit did not change project coverage.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/5db8343-Screen_Shot_2017-01-15_at_8.34.24_AM.png\",\n \"Screen Shot 2017-01-15 at 8.34.24 AM.png\",\n 516,\n 112,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 60.74%.\\nCommit diff was not affected.\\nCoverage decreased by .14%.\\n*An example of [Unexpected Coverage Changes](doc:unexpected-coverage-changes)*.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/3d839a3-Screen_Shot_2017-01-15_at_8.47.34_AM.png\",\n \"Screen Shot 2017-01-15 at 8.47.34 AM.png\",\n 526,\n 120,\n \"#e7f4e3\"\n ],\n \"caption\": \"Project coverage at this commit is 61%.\\nCommit diff is 100% covered.\\nCoverage increased by 1%.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/f034515-Screen_Shot_2017-01-15_at_8.51.41_AM.png\",\n \"Screen Shot 2017-01-15 at 8.51.41 AM.png\",\n 528,\n 120,\n \"#e33c93\"\n ],\n \"caption\": \"Project coverage is 50%.\\nCommit diff is 20% covered.\\nCoverage dropped by 3%.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/51798bc-Screen_Shot_2017-01-16_at_1.54.44_PM.png\",\n \"Screen Shot 2017-01-16 at 1.54.44 PM.png\",\n 514,\n 104,\n \"#e33c93\"\n ],\n \"caption\": \"Project is 80% covered.\\nCommit diff was not affected.\\nCoverage dropped 1%.\\n*Example of [Coverage Offset](doc:coverage-offset)*.\",\n \"sizing\": \"80\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"What is \\\"ø\\\"?\"\n}\n[/block]\n> The character `ø` represents \"not affected\" or \"no change\". This value could be found in the **** and **(change)** block of the Coverage Delta.\n\nWhen found in the **** block, it represents that the coverage diff was not concerning coverage. (e.g a commit that only adjusts lines *not* tracked by coverage.)\n\nWhen found in the **(change)** block, it represents that coverage did not change. (e.g. `0%` change. The commit did not affect project coverage.)\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Contexts\"\n}\n[/block]\nWe use the Codecov Delta throughout the app. It expresses details for the entire project, flags, diffs, folders and files. It is important to understand the context of the delta.\n\nThe absolute, relative, and change metrics refer to the context. In the example below, the Codecov Delta appears in the file headers. The Delta's metrics concern only the file itself.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b6544f2-Screen_Shot_2017-01-15_at_11.10.27_AM.png\",\n \"Screen Shot 2017-01-15 at 11.10.27 AM.png\",\n 2290,\n 186,\n \"#f3f5f2\"\n ],\n \"caption\": \"The file `reference.go` is 79% covered.\\nIn this commit there was 12 lines added which were 100% covered.\\nIt results in the file having 5% more coverage.\"\n }\n ]\n}\n[/block]","order":5,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"pendingAlgoliaPublish":false,"previousSlug":"","slugUpdatedAt":"2021-06-10T21:45:18.971Z","_id":"604a3fa3d6d5f00080272576","__v":8,"createdAt":"2016-12-14T17:52:06.439Z","githubsync":"","project":"57b33b5ec9a4551700b969a5","user":"5b47e58599e0430003d8e823","category":"605e107fa1b4710022622bb9","version":"604a3fa3d6d5f0008027258e","parentDoc":null,"updatedAt":"2021-12-21T11:08:01.148Z","isApi":false,"id":"604a3fa3d6d5f00080272576"},"hideTOC":false,"meta":{"slug":"codecov-delta","type":"docs","parent":null,"image":[],"title":"Codecov Delta","title_raw":"Codecov Delta","description":"Understanding the numbers and syntax","_id":"604a3fa3d6d5f00080272576","hidden":false},"slugUrl":"/docs/codecov-delta","config":{"algoliaIndex":"readme_search_v2","asset_url":"https://cdn.readme.io","domain":"readme.io","domainFull":"https://dash.readme.com","legacy_asset_url":"https://cdn-hub1.readme.io","metricsPrimus":{"retries":10,"pingTimeout":45000},"dashMetricsUrl":"https://m.readme.io","metricsUrl":"https://metrics.readme.io","releaseVersion":"4.159.2","sentry":{"enabled":true,"dsn":"https://3bbe57a973254129bcb93e47dc0cc46f@o343074.ingest.sentry.io/2052166","tracesSampleRate":0},"sslGenerationService":"ssl.readmessl.com"},"context":{"user":{},"terms":[],"variables":{"user":{},"defaults":[]},"project":{"appearance":{"notheme":false,"logo":["https://files.readme.io/5affb88-codecov.svg","codecov.svg",60,60,"#ff0077"],"html_footer":"","javascript":"","landing":true,"promos":[{"extras":{"type":"buttons","buttonPrimary":"get-started","buttonSecondary":""},"title":"Code coverage done right.®","text":"Welcome to Codecov Documentation. You'll find comprehensive guides and documentation to help you start working with Codecov as quickly as possible, as well as support if you get stuck. Let's jump right in!","_id":"57b33b5ec9a4551700b969a6"}],"stylesheet":"","body":{"style":"none"},"html_hidelinks":false,"favicon":["https://files.readme.io/f743cbc-small-Codecov_Mark_Circle_Pink.png","Codecov Mark Circle Pink.png",32,32,"#f35197","https://files.readme.io/9452196-Codecov_Mark_Circle_Pink.png"],"html_body":"","html_head":"","typography":{"tk_body":"","tk_headline":"","tk_key":"","typekit":false,"body":"Open+Sans:400:sans-serif","headline":"Open+Sans:400:sans-serif"},"hide_logo":false,"header":{"img":[],"img_pos":"tl","img_size":"tile-x","style":"solid"},"javascript_hub2":"","link_logo_to_url":false,"main_body":{"type":"links"},"sticky":false,"colors":{"body_highlight":"#5bb3f2","header_text":"","highlight":"","main":"#F01F7A","main_alt":"#38591e","custom_login_link_color":""},"html_footer_meta":"","stylesheet_hub2":".theme-solid header#hub-header #header-top {\n background-color:#0f1b29 !important;\n}\n\ncode {\n background: #eeeeee;\n padding: 2px 5px;\n}\n\npre > code {\n background: inherit;\n\tpadding: 0px;\n}\n\n/*Enlarging the helpful/not helpful box at the bottom*/\ndiv.PageThumbs-helpful { font-size: 17px; }","theme":"line","html_promo":"","logo_white":[],"logo_white_use":false,"overlay":"circuits","showVersion":true,"referenceLayout":"row","categoriesAsDropdown":false,"childrenAsPills":false,"global_landing_page":{"html":"","redirect":""},"hideTableOfContents":false,"nextStepsLabel":"","splitReferenceDocs":false,"rdmd":{"callouts":{"useIconFont":false},"theme":{"background":"","border":"","markdownEdge":"","markdownFont":"","markdownFontSize":"","markdownLineHeight":"","markdownRadius":"","markdownText":"","markdownTitle":"","markdownTitleFont":"","mdCodeBackground":"","mdCodeFont":"","mdCodeRadius":"","mdCodeTabs":"","mdCodeText":"","tableEdges":"","tableHead":"","tableHeadText":"","tableRow":"","tableStripe":"","tableText":"","text":"","title":""}},"subheaderStyle":"dropdown","showMetricsInReference":true,"referenceSimpleMode":true,"stylesheet_hub3":"","loginLogo":[]},"custom_domain":"docs.codecov.com","error404":"","first_page":"docs","flags":{"oauth":false,"speedyRender":false,"jwt":false,"migrationRun":false,"migrationSwaggerRun":true,"correctnewlines":false,"hub2":true,"swagger":false,"allowXFrame":false,"allow_hub2":false,"autoSslGeneration":true,"newApiExplorer":true,"apilogs":false,"cookieAuthentication":false,"directGoogleToStableVersion":false,"disableAnonForum":false,"enterprise":false,"hideGoogleAnalytics":false,"translation":false,"newEditor":false,"alwaysShowDocPublishStatus":false,"newMarkdown":false,"newMarkdownBetaProgram":true,"newMarkdownLooseMode":false,"oldMarkdown":false,"newSearch":true,"rdmdCompatibilityMode":false,"staging":false,"tutorials":true,"allowApiExplorerJsonEditor":false,"useReactApp":true,"newHeader":false,"referenceRedesign":false,"internalSamlFlow":false,"auth0Oauth":false,"graphql":false,"singleProjectEnterprise":false,"dashReact":false,"allowReferenceUpgrade":true,"metricsV2":true,"newEditorDash":false,"enableRealtimeExperiences":false,"reviewWorkflow":false},"fullBaseUrl":"https://docs.codecov.com/","glossaryTerms":[],"graphqlSchema":"","healthCheck":{"provider":""},"intercom_secure_emailonly":false,"intercom":"","is_active":true,"landing_bottom":[],"metrics":{"enabled":false,"thumbsEnabled":true,"monthlyLimit":0,"planLimit":5000000,"realtime":{"dashEnabled":false,"hubEnabled":false}},"modules":{"suggested_edits":true,"discuss":false,"docs":true,"examples":true,"landing":false,"reference":true,"logs":false,"changelog":true,"custompages":false,"tutorials":false,"graphql":false},"name":"Codecov","nav_names":{"discuss":"Discussion","docs":"","reference":"API Endpoints","changelog":"Changelog","tutorials":""},"oauth_url":"","plan":"business","planTrial":"business","readmeScore":{"components":{"newDesign":{"enabled":true,"points":25},"reference":{"enabled":true,"points":50},"tryItNow":{"enabled":true,"points":35},"syncingOAS":{"enabled":false,"points":10},"customLogin":{"enabled":false,"points":25},"metrics":{"enabled":false,"points":40},"recipes":{"enabled":false,"points":15},"pageVoting":{"enabled":true,"points":1},"suggestedEdits":{"enabled":true,"points":10},"support":{"enabled":false,"points":5},"htmlLanding":{"enabled":false,"points":5},"guides":{"enabled":true,"points":10},"changelog":{"enabled":true,"points":5},"glossary":{"enabled":false,"points":1},"variables":{"enabled":false,"points":1},"integrations":{"enabled":true,"points":2}},"percentScore":50,"totalScore":138},"reCaptchaSiteKey":"","stable":{"_id":"604a3fa3d6d5f0008027258e","version":"4.6","version_clean":"4.6.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["604a3fa3d6d5f00080272532","604a3fa3d6d5f00080272533","584d8c8ecda2b40f000583b1","604a3fa3d6d5f00080272534","604a3fa3d6d5f00080272535","604a3fa3d6d5f00080272536","604a3fa3d6d5f00080272537","604a3fa3d6d5f00080272538","604a3fa3d6d5f00080272539","604a3fa3d6d5f0008027253a","604a3fa3d6d5f0008027253b","604a3fa3d6d5f0008027253c","58a898f47e69742300452fd5","5eb0413161ae28003916ffe0","604a3fa3d6d5f0008027253d","604babcfe3d113006c0ac382","605e107fa1b4710022622bb9","605e1084bc81560031aae596","605e135b517d83006763f4ed"],"__v":0,"project":"57b33b5ec9a4551700b969a5","forked_from":"5eb0413161ae28003917002e","createdAt":"2016-12-11T17:27:42.671Z","releaseDate":"2016-12-11T17:27:42.671Z"},"subdomain":"codecov","subpath":"","topnav":{"edited":true,"left":[{"type":"docs","text":"Guides"},{"type":"url","text":"API","url":"https://docs.codecov.com/reference"},{"type":"changelog","text":"Changelog"},{"type":"url","text":"Support","url":"https://codecov.io/support"},{"text":"Status","url":"https://status.codecov.com","type":"url"},{"type":"url","text":"Community","url":"https://community.codecov.com"},{"type":"url","url":"https://about.codecov.io","text":"Back to Codecov"}],"right":[{"type":"user","text":"User","url":"/login?redirect_uri=/docs/codecov-delta"}],"bottom":[]},"translate":{"languages":[],"provider":"transifex","key_public":"","key_secret":"","org_name":"","project_name":"","show_widget":false},"url":"https://codecov.io","versions":[{"_id":"57b33b5ec9a4551700b969a8","categories":["57b33b5ec9a4551700b969a9","57b44723da7a913200179dfb","57b448586e6ff6360047426b","57b448846e6ff6360047426c","57b448f16e6ff6360047426d","57b44957fdc0f42000dc99e6","57b462550d2b640e00e9d3cd","57b4625c6e6ff6360047427c","57b462670d2b640e00e9d3ce","57b469eb6e6ff6360047428f","57b46e0b0d2b640e00e9d3d6","57b4a39f0d2b640e00e9d422","57b4a3a46e6ff636004742fd","57b4a3aa0d2b640e00e9d423","57b4a3ad6e6ff636004742fe","57b4a3c06e6ff636004742ff","57b60ffe25f6e20e00d5cb58","57b8b313f442340e00b01747","57dbfa0ff4da530e00b3b5e2","57ed1a1e4dea95190086c531"],"codename":"","createdAt":"2016-08-16T16:12:14.823Z","is_beta":false,"is_deprecated":true,"is_hidden":true,"__v":20,"version":"1.0","releaseDate":"2016-08-16T16:12:14.823Z","version_clean":"1.0.0","is_stable":false,"project":"57b33b5ec9a4551700b969a5"},{"_id":"584d8c8ecda2b40f000583ae","version_clean":"4.3.0","__v":4,"codename":"","createdAt":"2016-12-11T17:27:42.671Z","is_beta":false,"is_deprecated":true,"is_hidden":true,"categories":["584d8c8ecda2b40f000583af","584d8c8ecda2b40f000583b0","584d8c8ecda2b40f000583b1","584d8c8ecda2b40f000583b2","584d8c8ecda2b40f000583b3","584d8c8ecda2b40f000583b4","584d8c8ecda2b40f000583b5","584d8c8ecda2b40f000583b6","584d8c8ecda2b40f000583b7","584d8c8ecda2b40f000583b8","587bf19178eb7a23002d2d08","587d4bd0cd6f210f00949bd8","58a898f47e69742300452fd5"],"is_stable":false,"project":"57b33b5ec9a4551700b969a5","releaseDate":"2016-12-11T17:27:42.671Z","version":"4.3.0"},{"_id":"58e7d832bc0deb0f0027f1f5","is_deprecated":true,"codename":"","version_clean":"4.3.6","releaseDate":"2016-12-11T17:27:42.671Z","is_beta":false,"is_stable":false,"createdAt":"2016-12-11T17:27:42.671Z","is_hidden":true,"categories":["58e7d832bc0deb0f0027f1a2","58e7d832bc0deb0f0027f1a3","584d8c8ecda2b40f000583b1","58e7d832bc0deb0f0027f1a4","58e7d832bc0deb0f0027f1a5","58e7d832bc0deb0f0027f1a6","58e7d832bc0deb0f0027f1a7","58e7d832bc0deb0f0027f1a8","58e7d832bc0deb0f0027f1a9","58e7d832bc0deb0f0027f1aa","58e7d832bc0deb0f0027f1ab","58e7d832bc0deb0f0027f1ac","58a898f47e69742300452fd5"],"version":"4.3.6","project":"57b33b5ec9a4551700b969a5","forked_from":"584d8c8ecda2b40f000583ae","__v":0},{"_id":"5c3e5a3c387b7b004b8a03d3","__v":2,"project":"57b33b5ec9a4551700b969a5","forked_from":"584d8c8ecda2b40f000583ae","createdAt":"2016-12-11T17:27:42.671Z","releaseDate":"2016-12-11T17:27:42.671Z","categories":["5c3e5a3c387b7b004b8a0380","5c3e5a3c387b7b004b8a0381","584d8c8ecda2b40f000583b1","5c3e5a3c387b7b004b8a0382","5c3e5a3c387b7b004b8a0383","5c3e5a3c387b7b004b8a0384","5c3e5a3c387b7b004b8a0385","5c3e5a3c387b7b004b8a0386","5c3e5a3c387b7b004b8a0387","5c3e5a3c387b7b004b8a0388","5c3e5a3c387b7b004b8a0389","5c3e5a3c387b7b004b8a038a","58a898f47e69742300452fd5","5c4e71ef0cddf0002ca47768","5c4e7206021404002bd6e988"],"is_deprecated":false,"is_hidden":true,"is_beta":false,"is_stable":false,"codename":"","version_clean":"4.4.0","version":"4.4.0"},{"_id":"5eb0413161ae28003917002e","version":"4.5","version_clean":"4.5.0","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":["5eb0413161ae28003916ffd5","5eb0413161ae28003916ffd6","584d8c8ecda2b40f000583b1","5eb0413161ae28003916ffd7","5eb0413161ae28003916ffd8","5eb0413161ae28003916ffd9","5eb0413161ae28003916ffda","5eb0413161ae28003916ffdb","5eb0413161ae28003916ffdc","5eb0413161ae28003916ffdd","5eb0413161ae28003916ffde","5eb0413161ae28003916ffdf","58a898f47e69742300452fd5","5eb0413161ae28003916ffe0","5eb0413161ae28003916ffe1"],"__v":0,"project":"57b33b5ec9a4551700b969a5","forked_from":"5c3e5a3c387b7b004b8a03d3","createdAt":"2016-12-11T17:27:42.671Z","releaseDate":"2016-12-11T17:27:42.671Z"},{"_id":"604a3fa3d6d5f0008027258e","version":"4.6","version_clean":"4.6.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["604a3fa3d6d5f00080272532","604a3fa3d6d5f00080272533","584d8c8ecda2b40f000583b1","604a3fa3d6d5f00080272534","604a3fa3d6d5f00080272535","604a3fa3d6d5f00080272536","604a3fa3d6d5f00080272537","604a3fa3d6d5f00080272538","604a3fa3d6d5f00080272539","604a3fa3d6d5f0008027253a","604a3fa3d6d5f0008027253b","604a3fa3d6d5f0008027253c","58a898f47e69742300452fd5","5eb0413161ae28003916ffe0","604a3fa3d6d5f0008027253d","604babcfe3d113006c0ac382","605e107fa1b4710022622bb9","605e1084bc81560031aae596","605e135b517d83006763f4ed"],"__v":0,"project":"57b33b5ec9a4551700b969a5","forked_from":"5eb0413161ae28003917002e","createdAt":"2016-12-11T17:27:42.671Z","releaseDate":"2016-12-11T17:27:42.671Z"}],"isHubEditable":true},"version":{"_id":"604a3fa3d6d5f0008027258e","version":"4.6","version_clean":"4.6.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["604a3fa3d6d5f00080272532","604a3fa3d6d5f00080272533","584d8c8ecda2b40f000583b1","604a3fa3d6d5f00080272534","604a3fa3d6d5f00080272535","604a3fa3d6d5f00080272536","604a3fa3d6d5f00080272537","604a3fa3d6d5f00080272538","604a3fa3d6d5f00080272539","604a3fa3d6d5f0008027253a","604a3fa3d6d5f0008027253b","604a3fa3d6d5f0008027253c","58a898f47e69742300452fd5","5eb0413161ae28003916ffe0","604a3fa3d6d5f0008027253d","604babcfe3d113006c0ac382","605e107fa1b4710022622bb9","605e1084bc81560031aae596","605e135b517d83006763f4ed"],"__v":0,"project":"57b33b5ec9a4551700b969a5","forked_from":"5eb0413161ae28003917002e","createdAt":"2016-12-11T17:27:42.671Z","releaseDate":"2016-12-11T17:27:42.671Z"}},"reqUrl":"/docs/codecov-delta","version":{"_id":"604a3fa3d6d5f0008027258e","version":"4.6","version_clean":"4.6.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["604a3fa3d6d5f00080272532","604a3fa3d6d5f00080272533","584d8c8ecda2b40f000583b1","604a3fa3d6d5f00080272534","604a3fa3d6d5f00080272535","604a3fa3d6d5f00080272536","604a3fa3d6d5f00080272537","604a3fa3d6d5f00080272538","604a3fa3d6d5f00080272539","604a3fa3d6d5f0008027253a","604a3fa3d6d5f0008027253b","604a3fa3d6d5f0008027253c","58a898f47e69742300452fd5","5eb0413161ae28003916ffe0","604a3fa3d6d5f0008027253d","604babcfe3d113006c0ac382","605e107fa1b4710022622bb9","605e1084bc81560031aae596","605e135b517d83006763f4ed"],"__v":0,"project":"57b33b5ec9a4551700b969a5","forked_from":"5eb0413161ae28003917002e","createdAt":"2016-12-11T17:27:42.671Z","releaseDate":"2016-12-11T17:27:42.671Z"},"lang":"en","langFull":"English","isDetachedProductionSite":false,"rdmdOpts":{"normalize":true,"correctnewlines":false,"compatibilityMode":false}}">