mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-08 16:16:24 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eaaf4bedf3 | ||
|
|
c2ab9ab2e1 | ||
|
|
49c20db375 | ||
|
|
cf8e3e4262 | ||
|
|
1c34415a06 | ||
|
|
b4dfea724f | ||
|
|
5bf250470e | ||
|
|
1dd0ce34be | ||
|
|
894ff025c7 | ||
|
|
f539f977d5 | ||
|
|
6757614f24 | ||
|
|
cdee249da5 | ||
|
|
ce548e935a |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,3 +1,23 @@
|
||||
## 3.1.4
|
||||
### Fixes
|
||||
- #967 Fix typo in README.md
|
||||
- #971 fix: add back in working dir
|
||||
- #969 fix: CLI option names for uploader
|
||||
|
||||
### Dependencies
|
||||
- #970 build(deps-dev): bump @types/node from 18.15.12 to 18.16.3
|
||||
- #979 build(deps-dev): bump @types/node from 20.1.0 to 20.1.2
|
||||
- #981 build(deps-dev): bump @types/node from 20.1.2 to 20.1.4
|
||||
|
||||
## 3.1.3
|
||||
### Fixes
|
||||
- #960 fix: allow for aarch64 build
|
||||
|
||||
### Dependencies
|
||||
- #957 build(deps-dev): bump jest-junit from 15.0.0 to 16.0.0
|
||||
- #958 build(deps): bump openpgp from 5.7.0 to 5.8.0
|
||||
- #959 build(deps-dev): bump @types/node from 18.15.10 to 18.15.12
|
||||
|
||||
## 3.1.2
|
||||
### Fixes
|
||||
- #718 Update README.md
|
||||
|
||||
@@ -69,7 +69,7 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
|
||||
| `gcov_include` | Paths to include during gcov gathering | Optional
|
||||
| `gcov_executable` | gcov executable to run. Defaults to gcov. | Optional
|
||||
| `name` | Custom defined name for the upload | Optional
|
||||
| `network_filer` | Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing | Optional
|
||||
| `network_filter` | Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing | Optional
|
||||
| `network_prefix` | Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing | Optional
|
||||
| `os` | Specify the OS (linux, macos, windows, alpine) | Optional
|
||||
| `override_branch` | Specify the branch name | Optional
|
||||
@@ -86,6 +86,7 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
|
||||
| `url` | Change the upload host (Enterprise use) | Optional
|
||||
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
||||
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
|
||||
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
|
||||
| `xtra_args` | Add additional uploader args that may be missing in the Action | Optional
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ inputs:
|
||||
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
|
||||
required: false
|
||||
os:
|
||||
description: 'Override the assumed OS. Options are alpine | linux | macos | windows.'
|
||||
description: 'Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows.'
|
||||
required: false
|
||||
override_branch:
|
||||
description: 'Specify the branch name'
|
||||
@@ -104,6 +104,9 @@ inputs:
|
||||
version:
|
||||
description: 'Specify which version of the Codecov Uploader should be used. Defaults to `latest`'
|
||||
required: false
|
||||
working-directory:
|
||||
description: 'Directory in which to execute codecov.sh'
|
||||
required: false
|
||||
xcode:
|
||||
description: 'Run with xcode support'
|
||||
required: false
|
||||
|
||||
40
dist/index.js
vendored
40
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
46
package-lock.json
generated
46
package-lock.json
generated
@@ -1,30 +1,30 @@
|
||||
{
|
||||
"name": "codecov-action",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "codecov-action",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^5.1.1",
|
||||
"node-fetch": "^3.3.1",
|
||||
"openpgp": "5.7"
|
||||
"openpgp": "5.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.5.0",
|
||||
"@types/node": "^18.15.10",
|
||||
"@types/node": "^20.1.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||
"@typescript-eslint/parser": "^4.29.2",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest-junit": "^15.0.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"ts-jest": "^26.5.6",
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
@@ -1329,9 +1329,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
|
||||
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==",
|
||||
"version": "20.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz",
|
||||
"integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/normalize-package-data": {
|
||||
@@ -4447,9 +4447,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/jest-junit": {
|
||||
"version": "15.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz",
|
||||
"integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==",
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
|
||||
"integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"mkdirp": "^1.0.4",
|
||||
@@ -5535,9 +5535,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/openpgp": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.7.0.tgz",
|
||||
"integrity": "sha512-wchYJQfFbSaocUvUIYqNrWD+lRSmFSG1d3Ak2CHeXFocDSEsf7Uc1zUzHjSdlZPTvGeeXPQ+MJrwVtalL4QCBg==",
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.8.0.tgz",
|
||||
"integrity": "sha512-hq4+4s/vpjuwGgZSjplGp4j5FzSz+KwiFRiqMx+ZXr7VCK3CvTkktYilMTZMrf2vHsFH8aQ0596Lmn07HeKRmQ==",
|
||||
"dependencies": {
|
||||
"asn1.js": "^5.0.0"
|
||||
},
|
||||
@@ -8847,9 +8847,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "18.15.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
|
||||
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==",
|
||||
"version": "20.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz",
|
||||
"integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/normalize-package-data": {
|
||||
@@ -11211,9 +11211,9 @@
|
||||
}
|
||||
},
|
||||
"jest-junit": {
|
||||
"version": "15.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz",
|
||||
"integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==",
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
|
||||
"integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mkdirp": "^1.0.4",
|
||||
@@ -12071,9 +12071,9 @@
|
||||
}
|
||||
},
|
||||
"openpgp": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.7.0.tgz",
|
||||
"integrity": "sha512-wchYJQfFbSaocUvUIYqNrWD+lRSmFSG1d3Ak2CHeXFocDSEsf7Uc1zUzHjSdlZPTvGeeXPQ+MJrwVtalL4QCBg==",
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.8.0.tgz",
|
||||
"integrity": "sha512-hq4+4s/vpjuwGgZSjplGp4j5FzSz+KwiFRiqMx+ZXr7VCK3CvTkktYilMTZMrf2vHsFH8aQ0596Lmn07HeKRmQ==",
|
||||
"requires": {
|
||||
"asn1.js": "^5.0.0"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codecov-action",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.4",
|
||||
"description": "Upload coverage reports to Codecov from GitHub Actions",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -27,18 +27,18 @@
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^5.1.1",
|
||||
"node-fetch": "^3.3.1",
|
||||
"openpgp": "5.7"
|
||||
"openpgp": "5.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.5.0",
|
||||
"@types/node": "^18.15.10",
|
||||
"@types/node": "^20.1.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||
"@typescript-eslint/parser": "^4.29.2",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest-junit": "^15.0.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"ts-jest": "^26.5.6",
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
|
||||
@@ -33,8 +33,7 @@ test('all arguments', () => {
|
||||
'file': 'coverage.xml',
|
||||
'files': 'dir1/coverage.xml,dir2/coverage.xml',
|
||||
'flags': 'test,test2',
|
||||
'functionalities':
|
||||
'network',
|
||||
'functionalities': 'network',
|
||||
'full_report': 'oldDir/oldReport.json',
|
||||
'gcov': 'true',
|
||||
'gcov_args': '-v',
|
||||
@@ -60,7 +59,7 @@ test('all arguments', () => {
|
||||
'verbose': 't',
|
||||
'xcode': 'true',
|
||||
'xcode_archive_path': '/test.xcresult',
|
||||
'xtra_args': '-some -other -args',
|
||||
'xtra_args': '--some --other --args',
|
||||
};
|
||||
|
||||
for (const env of Object.keys(envs)) {
|
||||
@@ -88,24 +87,24 @@ test('all arguments', () => {
|
||||
'dir1/coverage.xml',
|
||||
'-f',
|
||||
'dir2/coverage.xml',
|
||||
'-full',
|
||||
'--full',
|
||||
'oldDir/oldReport.json',
|
||||
'-F',
|
||||
'test',
|
||||
'-F',
|
||||
'test2',
|
||||
'-g',
|
||||
'-gcovArgs',
|
||||
'--ga',
|
||||
'-v',
|
||||
'-gcovIgnore',
|
||||
'--gi',
|
||||
'*.fake',
|
||||
'-gcovInclude',
|
||||
'--gI',
|
||||
'real_file',
|
||||
'-gcovExecutable',
|
||||
'--gx',
|
||||
'gcov2',
|
||||
'-networkFilter',
|
||||
'-i',
|
||||
'src/',
|
||||
'-networkPrefix',
|
||||
'-k',
|
||||
'build/',
|
||||
'-B',
|
||||
'thomasrockhu/test',
|
||||
@@ -123,18 +122,18 @@ test('all arguments', () => {
|
||||
'coverage/',
|
||||
'-r',
|
||||
'fakeOwner/fakeRepo',
|
||||
'-xs',
|
||||
'-xsp',
|
||||
'--xs',
|
||||
'--xsp',
|
||||
'MyApp',
|
||||
'-U',
|
||||
'https://codecov.example.com',
|
||||
'-u',
|
||||
'https://codecov.enterprise.com',
|
||||
'-v',
|
||||
'-xc',
|
||||
'-xp',
|
||||
'--xc',
|
||||
'--xp',
|
||||
'/test.xcresult',
|
||||
'-some -other -args',
|
||||
'--some --other --args',
|
||||
]);
|
||||
expect(failCi).toBeTruthy();
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ const buildExec = () => {
|
||||
const upstream = core.getInput('upstream_proxy');
|
||||
const url = core.getInput('url');
|
||||
const verbose = isTrue(core.getInput('verbose'));
|
||||
const workingDir = core.getInput('working-directory');
|
||||
const xcode = core.getInput('xcode');
|
||||
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||||
const xtraArgs = core.getInput('xtra_args');
|
||||
@@ -114,7 +115,7 @@ const buildExec = () => {
|
||||
});
|
||||
}
|
||||
if (fullReport) {
|
||||
execArgs.push('-full', `${fullReport}`);
|
||||
execArgs.push('--full', `${fullReport}`);
|
||||
}
|
||||
if (flags) {
|
||||
flags.split(',').map((f) => f.trim()).forEach((f) => {
|
||||
@@ -126,23 +127,23 @@ const buildExec = () => {
|
||||
execArgs.push('-g');
|
||||
}
|
||||
if (gcovArgs) {
|
||||
execArgs.push('-gcovArgs', `${gcovArgs}`);
|
||||
execArgs.push('--ga', `${gcovArgs}`);
|
||||
}
|
||||
if (gcovIgnore) {
|
||||
execArgs.push('-gcovIgnore', `${gcovIgnore}`);
|
||||
execArgs.push('--gi', `${gcovIgnore}`);
|
||||
}
|
||||
if (gcovInclude) {
|
||||
execArgs.push('-gcovInclude', `${gcovInclude}`);
|
||||
execArgs.push('--gI', `${gcovInclude}`);
|
||||
}
|
||||
if (gcovExecutable) {
|
||||
execArgs.push('-gcovExecutable', `${gcovExecutable}`);
|
||||
execArgs.push('--gx', `${gcovExecutable}`);
|
||||
}
|
||||
|
||||
if (networkFilter) {
|
||||
execArgs.push('-networkFilter', `${networkFilter}`);
|
||||
execArgs.push('-i', `${networkFilter}`);
|
||||
}
|
||||
if (networkPrefix) {
|
||||
execArgs.push('-networkPrefix', `${networkPrefix}`);
|
||||
execArgs.push('-k', `${networkPrefix}`);
|
||||
}
|
||||
|
||||
if (overrideBranch) {
|
||||
@@ -179,10 +180,10 @@ const buildExec = () => {
|
||||
execArgs.push('-r', `${slug}`);
|
||||
}
|
||||
if (swift) {
|
||||
execArgs.push('-xs');
|
||||
execArgs.push('--xs');
|
||||
}
|
||||
if (swift && swiftProject) {
|
||||
execArgs.push('-xsp', `${swiftProject}`);
|
||||
execArgs.push('--xsp', `${swiftProject}`);
|
||||
}
|
||||
if (upstream) {
|
||||
execArgs.push('-U', `${upstream}`);
|
||||
@@ -194,8 +195,8 @@ const buildExec = () => {
|
||||
execArgs.push('-v');
|
||||
}
|
||||
if (xcode && xcodeArchivePath) {
|
||||
execArgs.push('-xc');
|
||||
execArgs.push('-xp', `${xcodeArchivePath}`);
|
||||
execArgs.push('--xc');
|
||||
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||
}
|
||||
|
||||
if (uploaderVersion == '') {
|
||||
@@ -206,6 +207,10 @@ const buildExec = () => {
|
||||
console.debug({execArgs});
|
||||
}
|
||||
|
||||
if (workingDir) {
|
||||
options.cwd = workingDir;
|
||||
}
|
||||
|
||||
if (xtraArgs) {
|
||||
execArgs.push(`${xtraArgs}`);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ test('getBaseUrl', () => {
|
||||
expect(PLATFORMS.map((platform) => {
|
||||
return getBaseUrl(platform, 'latest');
|
||||
})).toEqual([
|
||||
'https://uploader.codecov.io/latest/aarch64/codecov',
|
||||
'https://uploader.codecov.io/latest/alpine/codecov',
|
||||
'https://uploader.codecov.io/latest/linux/codecov',
|
||||
'https://uploader.codecov.io/latest/macos/codecov',
|
||||
@@ -48,6 +49,7 @@ test('getBaseUrl', () => {
|
||||
expect(PLATFORMS.map((platform) => {
|
||||
return getBaseUrl(platform, 'v0.1.0_8880');
|
||||
})).toEqual([
|
||||
'https://uploader.codecov.io/v0.1.0_8880/aarch64/codecov',
|
||||
'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov',
|
||||
'https://uploader.codecov.io/v0.1.0_8880/linux/codecov',
|
||||
'https://uploader.codecov.io/v0.1.0_8880/macos/codecov',
|
||||
@@ -58,13 +60,13 @@ test('getBaseUrl', () => {
|
||||
test('isWindows', () => {
|
||||
expect(PLATFORMS.map((platform) => {
|
||||
return isWindows(platform);
|
||||
})).toEqual([false, false, false, true]);
|
||||
})).toEqual([false, false, false, false, true]);
|
||||
});
|
||||
|
||||
test('isValidPlatform', () => {
|
||||
expect(PLATFORMS.map((platform) => {
|
||||
return isValidPlatform(platform);
|
||||
})).toEqual([true, true, true, true]);
|
||||
})).toEqual([true, true, true, true, true]);
|
||||
|
||||
expect(isValidPlatform('fakeos')).toBeFalsy();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import * as core from '@actions/core';
|
||||
|
||||
const PLATFORMS = ['alpine', 'linux', 'macos', 'windows'];
|
||||
const PLATFORMS = [
|
||||
'aarch64',
|
||||
'alpine',
|
||||
'linux',
|
||||
'macos',
|
||||
'windows',
|
||||
];
|
||||
|
||||
const setFailure = (message: string, failCi: boolean): void => {
|
||||
failCi ? core.setFailed(message) : core.warning(message);
|
||||
|
||||
Reference in New Issue
Block a user