Merge pull request #688 from codecov/feat/gcov

Incorporate `gcov` arguments for the Codecov uploader
This commit is contained in:
Tom Hu 2022-04-04 16:41:54 -04:00 committed by GitHub
commit c3d40623c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 80 additions and 7 deletions

View file

@ -1,3 +1,15 @@
## 2.2.0
### Features
- #688 Incorporate `gcov` arguments for the Codecov uploader
### Dependencies
- #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
- #603 [Snyk] Upgrade @actions/core from 1.5.0 to 1.6.0
- #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
- #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
- #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
- #653 build(deps-dev): bump @types/node from 16.11.21 to 17.0.18
## 2.1.0
### Features
- #515 Allow specifying version of Codecov uploader

View file

@ -3,5 +3,5 @@ deploy:
git tag -d v2
git push origin :v2
git tag v2
git tag v$(VERSION) -m ""
git tag v$(VERSION) -s -m ""
git push origin --tags

View file

@ -61,6 +61,10 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
| `functionalities` | Toggle functionalities | Optional
| | `network` Disable uploading the file network |
| `gcov` | Run with gcov support |
| `gcov_args` | Extra arguments to pass to gcov |
| `gcov_ignore` | Paths to ignore during gcov gathering |
| `gcov_include` | Paths to include during gcov gathering |
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
| `name` | Custom defined name for the upload | Optional
| `override_branch` | Specify the branch name | Optional

View file

@ -32,6 +32,18 @@ inputs:
functionalities:
description: 'Comma-separated list, see the README for options and their usage'
required: false
gcov:
description: 'Run with gcov support'
required: false
gcov_args:
description: 'Extra arguments to pass to gcov'
required: false
gcov_ignore:
description: 'Paths to ignore during gcov gathering'
required: false
gcov_include:
description: 'Paths to include during gcov gathering'
required: false
move_coverage_to_trash:
description: 'Move discovered coverage reports to the trash'
required: false

18
dist/index.js vendored
View file

@ -12879,7 +12879,7 @@ var core = __nccwpck_require__(2186);
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
var github = __nccwpck_require__(5438);
;// CONCATENATED MODULE: ./package.json
const package_namespaceObject = {"i8":"2.1.0"};
const package_namespaceObject = {"i8":"2.2.0"};
;// CONCATENATED MODULE: ./src/buildExec.ts
@ -12902,6 +12902,10 @@ const buildExec = () => {
const file = core.getInput('file');
const files = core.getInput('files');
const flags = core.getInput('flags');
const gcov = core.getInput('gcov');
const gcovArgs = core.getInput('gcov_args');
const gcovIgnore = core.getInput('gcov_ignore');
const gcovInclude = core.getInput('gcov_include');
const functionalities = core.getInput('functionalities');
const name = core.getInput('name');
const os = core.getInput('os');
@ -12973,6 +12977,18 @@ const buildExec = () => {
execArgs.push('-F', `${f}`);
});
}
if (gcov) {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('--ga', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('--gi', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('--gI', `${gcovInclude}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "codecov-action",
"version": "2.1.0",
"version": "2.2.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "codecov-action",
"version": "2.1.0",
"version": "2.2.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.6.0",

View file

@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "2.1.0",
"version": "2.2.0",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
@ -16,7 +16,7 @@
"url": "git+https://github.com/codecov/codecov-action.git"
},
"keywords": [],
"author": "Ibrahim Ali",
"author": "Codecov",
"license": "MIT",
"bugs": {
"url": "https://github.com/codecov/codecov-action/issues"

View file

@ -35,6 +35,10 @@ test('all arguments', () => {
'flags': 'test,test2',
'functionalities':
'network',
'gcov': 'true',
'gcov_args': '-v',
'gcov_ignore': '*.fake',
'gcov_include': 'real_file',
'move_coverage_to_trash': 'true',
'name': 'codecov',
'override_branch': 'thomasrockhu/test',
@ -80,6 +84,13 @@ test('all arguments', () => {
'test',
'-F',
'test2',
'-g',
'--ga',
'-v',
'--gi',
'*.fake',
'--gI',
'real_file',
'-B',
'thomasrockhu/test',
'-b',

View file

@ -25,6 +25,10 @@ const buildExec = () => {
const file = core.getInput('file');
const files = core.getInput('files');
const flags = core.getInput('flags');
const gcov = core.getInput('gcov');
const gcovArgs = core.getInput('gcov_args');
const gcovIgnore = core.getInput('gcov_ignore');
const gcovInclude = core.getInput('gcov_include');
const functionalities = core.getInput('functionalities');
const name = core.getInput('name');
const os = core.getInput('os');
@ -105,6 +109,20 @@ const buildExec = () => {
execArgs.push('-F', `${f}`);
});
}
if (gcov) {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('--ga', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('--gi', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('--gI', `${gcovInclude}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
}