Compare commits

..

17 Commits
v3.1.2 ... v3

Author SHA1 Message Date
Tom Hu
ab904c41d6 chore(release): bump to 3.1.6 2024-01-30 11:17:54 -08:00
Tom Hu
a8c374ae46 Revert "action.yml: Update to Node.js 20 (#1228)"
This reverts commit 9140fdcf54.
2024-01-30 11:17:26 -08:00
Tom Hu
4fe8c5f003 chore(release): bump to 3.1.5 2024-01-25 10:44:09 -08:00
Robin Hallabro-Kokko
9140fdcf54 action.yml: Update to Node.js 20 (#1228)
Node.js 16 actions are deprecated.

This should suppress the deprecation notice: Please update the following actions to use Node.js 20: codecov/codecov-action@v3
2024-01-25 10:41:05 -08:00
Tom Hu
eaaf4bedf3 release: 3.1.4 (#983) 2023-05-15 16:48:57 -04:00
dependabot[bot]
c2ab9ab2e1 build(deps-dev): bump @types/node from 20.1.2 to 20.1.4 (#981)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.2 to 20.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 16:34:30 -04:00
dependabot[bot]
49c20db375 build(deps-dev): bump @types/node from 20.1.0 to 20.1.2 (#979)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.0 to 20.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 15:26:51 -04:00
dependabot[bot]
cf8e3e4262 build(deps-dev): bump @types/node from 18.16.3 to 20.1.0 (#975)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.3 to 20.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 21:58:45 -04:00
Kleis Auke Wolthuizen
1c34415a06 fix: CLI option names for uploader (#969)
Only single character aliases can be specified with a single dash (-).
2023-05-08 21:57:34 -04:00
Tom Hu
b4dfea724f fix: add back in working dir (#971) 2023-05-03 12:12:56 -04:00
Isaac Halvorson
5bf250470e Fix typo in README.md (#967)
Just noticed a small typo in the documentation, so I fixed it 👍
2023-05-02 15:03:05 -04:00
dependabot[bot]
1dd0ce34be build(deps-dev): bump @types/node from 18.15.12 to 18.16.3 (#970)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.12 to 18.16.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 15:20:11 -04:00
Tom Hu
894ff025c7 chore(release): bump to 3.1.3 (#961) 2023-04-20 10:40:20 -07:00
Tom Hu
f539f977d5 fix: allow for aarch64 build (#960) 2023-04-20 10:02:22 -07:00
dependabot[bot]
6757614f24 build(deps-dev): bump @types/node from 18.15.10 to 18.15.12 (#959)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.10 to 18.15.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 22:08:36 -07:00
dependabot[bot]
cdee249da5 build(deps): bump openpgp from 5.7.0 to 5.8.0 (#958)
Bumps [openpgp](https://github.com/openpgpjs/openpgpjs) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/openpgpjs/openpgpjs/releases)
- [Commits](https://github.com/openpgpjs/openpgpjs/compare/v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: openpgp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 22:08:19 -07:00
dependabot[bot]
ce548e935a build(deps-dev): bump jest-junit from 15.0.0 to 16.0.0 (#957)
Bumps [jest-junit](https://github.com/jest-community/jest-junit) from 15.0.0 to 16.0.0.
- [Release notes](https://github.com/jest-community/jest-junit/releases)
- [Commits](https://github.com/jest-community/jest-junit/compare/v15.0.0...v16.0.0)

---
updated-dependencies:
- dependency-name: jest-junit
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 22:07:58 -07:00
11 changed files with 120 additions and 74 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

46
package-lock.json generated
View File

@@ -1,30 +1,30 @@
{
"name": "codecov-action",
"version": "3.1.2",
"version": "3.1.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "codecov-action",
"version": "3.1.2",
"version": "3.1.6",
"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"
}

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "3.1.2",
"version": "3.1.6",
"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"
}

View File

@@ -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();

View File

@@ -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}`);
}

View File

@@ -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();
});

View File

@@ -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);