mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-09 20:36:25 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab904c41d6 | ||
|
|
a8c374ae46 | ||
|
|
4fe8c5f003 | ||
|
|
9140fdcf54 | ||
|
|
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
|
## 3.1.2
|
||||||
### Fixes
|
### Fixes
|
||||||
- #718 Update README.md
|
- #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_include` | Paths to include during gcov gathering | Optional
|
||||||
| `gcov_executable` | gcov executable to run. Defaults to gcov. | Optional
|
| `gcov_executable` | gcov executable to run. Defaults to gcov. | Optional
|
||||||
| `name` | Custom defined name for the upload | 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
|
| `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
|
| `os` | Specify the OS (linux, macos, windows, alpine) | Optional
|
||||||
| `override_branch` | Specify the branch name | 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
|
| `url` | Change the upload host (Enterprise use) | Optional
|
||||||
| `verbose` | Specify whether the Codecov output should be verbose | 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
|
| `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
|
| `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'
|
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
|
||||||
required: false
|
required: false
|
||||||
os:
|
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
|
required: false
|
||||||
override_branch:
|
override_branch:
|
||||||
description: 'Specify the branch name'
|
description: 'Specify the branch name'
|
||||||
@@ -104,6 +104,9 @@ inputs:
|
|||||||
version:
|
version:
|
||||||
description: 'Specify which version of the Codecov Uploader should be used. Defaults to `latest`'
|
description: 'Specify which version of the Codecov Uploader should be used. Defaults to `latest`'
|
||||||
required: false
|
required: false
|
||||||
|
working-directory:
|
||||||
|
description: 'Directory in which to execute codecov.sh'
|
||||||
|
required: false
|
||||||
xcode:
|
xcode:
|
||||||
description: 'Run with xcode support'
|
description: 'Run with xcode support'
|
||||||
required: false
|
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",
|
"name": "codecov-action",
|
||||||
"version": "3.1.2",
|
"version": "3.1.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.1.2",
|
"version": "3.1.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"node-fetch": "^3.3.1",
|
"node-fetch": "^3.3.1",
|
||||||
"openpgp": "5.7"
|
"openpgp": "5.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.5.0",
|
"@types/jest": "^27.5.0",
|
||||||
"@types/node": "^18.15.10",
|
"@types/node": "^20.1.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||||
"@typescript-eslint/parser": "^4.29.2",
|
"@typescript-eslint/parser": "^4.29.2",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-junit": "^15.0.0",
|
"jest-junit": "^16.0.0",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^26.5.6",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
}
|
}
|
||||||
@@ -1329,9 +1329,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.15.10",
|
"version": "20.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz",
|
||||||
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==",
|
"integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/normalize-package-data": {
|
"node_modules/@types/normalize-package-data": {
|
||||||
@@ -4447,9 +4447,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-junit": {
|
"node_modules/jest-junit": {
|
||||||
"version": "15.0.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
|
||||||
"integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==",
|
"integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
@@ -5535,9 +5535,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/openpgp": {
|
"node_modules/openpgp": {
|
||||||
"version": "5.7.0",
|
"version": "5.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.8.0.tgz",
|
||||||
"integrity": "sha512-wchYJQfFbSaocUvUIYqNrWD+lRSmFSG1d3Ak2CHeXFocDSEsf7Uc1zUzHjSdlZPTvGeeXPQ+MJrwVtalL4QCBg==",
|
"integrity": "sha512-hq4+4s/vpjuwGgZSjplGp4j5FzSz+KwiFRiqMx+ZXr7VCK3CvTkktYilMTZMrf2vHsFH8aQ0596Lmn07HeKRmQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"asn1.js": "^5.0.0"
|
"asn1.js": "^5.0.0"
|
||||||
},
|
},
|
||||||
@@ -8847,9 +8847,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "18.15.10",
|
"version": "20.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz",
|
||||||
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==",
|
"integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/normalize-package-data": {
|
"@types/normalize-package-data": {
|
||||||
@@ -11211,9 +11211,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-junit": {
|
"jest-junit": {
|
||||||
"version": "15.0.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
|
||||||
"integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==",
|
"integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
@@ -12071,9 +12071,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"openpgp": {
|
"openpgp": {
|
||||||
"version": "5.7.0",
|
"version": "5.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.8.0.tgz",
|
||||||
"integrity": "sha512-wchYJQfFbSaocUvUIYqNrWD+lRSmFSG1d3Ak2CHeXFocDSEsf7Uc1zUzHjSdlZPTvGeeXPQ+MJrwVtalL4QCBg==",
|
"integrity": "sha512-hq4+4s/vpjuwGgZSjplGp4j5FzSz+KwiFRiqMx+ZXr7VCK3CvTkktYilMTZMrf2vHsFH8aQ0596Lmn07HeKRmQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"asn1.js": "^5.0.0"
|
"asn1.js": "^5.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.1.2",
|
"version": "3.1.6",
|
||||||
"description": "Upload coverage reports to Codecov from GitHub Actions",
|
"description": "Upload coverage reports to Codecov from GitHub Actions",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -27,18 +27,18 @@
|
|||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"node-fetch": "^3.3.1",
|
"node-fetch": "^3.3.1",
|
||||||
"openpgp": "5.7"
|
"openpgp": "5.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.5.0",
|
"@types/jest": "^27.5.0",
|
||||||
"@types/node": "^18.15.10",
|
"@types/node": "^20.1.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||||
"@typescript-eslint/parser": "^4.29.2",
|
"@typescript-eslint/parser": "^4.29.2",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-junit": "^15.0.0",
|
"jest-junit": "^16.0.0",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^26.5.6",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ test('all arguments', () => {
|
|||||||
'file': 'coverage.xml',
|
'file': 'coverage.xml',
|
||||||
'files': 'dir1/coverage.xml,dir2/coverage.xml',
|
'files': 'dir1/coverage.xml,dir2/coverage.xml',
|
||||||
'flags': 'test,test2',
|
'flags': 'test,test2',
|
||||||
'functionalities':
|
'functionalities': 'network',
|
||||||
'network',
|
|
||||||
'full_report': 'oldDir/oldReport.json',
|
'full_report': 'oldDir/oldReport.json',
|
||||||
'gcov': 'true',
|
'gcov': 'true',
|
||||||
'gcov_args': '-v',
|
'gcov_args': '-v',
|
||||||
@@ -60,7 +59,7 @@ test('all arguments', () => {
|
|||||||
'verbose': 't',
|
'verbose': 't',
|
||||||
'xcode': 'true',
|
'xcode': 'true',
|
||||||
'xcode_archive_path': '/test.xcresult',
|
'xcode_archive_path': '/test.xcresult',
|
||||||
'xtra_args': '-some -other -args',
|
'xtra_args': '--some --other --args',
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const env of Object.keys(envs)) {
|
for (const env of Object.keys(envs)) {
|
||||||
@@ -88,24 +87,24 @@ test('all arguments', () => {
|
|||||||
'dir1/coverage.xml',
|
'dir1/coverage.xml',
|
||||||
'-f',
|
'-f',
|
||||||
'dir2/coverage.xml',
|
'dir2/coverage.xml',
|
||||||
'-full',
|
'--full',
|
||||||
'oldDir/oldReport.json',
|
'oldDir/oldReport.json',
|
||||||
'-F',
|
'-F',
|
||||||
'test',
|
'test',
|
||||||
'-F',
|
'-F',
|
||||||
'test2',
|
'test2',
|
||||||
'-g',
|
'-g',
|
||||||
'-gcovArgs',
|
'--ga',
|
||||||
'-v',
|
'-v',
|
||||||
'-gcovIgnore',
|
'--gi',
|
||||||
'*.fake',
|
'*.fake',
|
||||||
'-gcovInclude',
|
'--gI',
|
||||||
'real_file',
|
'real_file',
|
||||||
'-gcovExecutable',
|
'--gx',
|
||||||
'gcov2',
|
'gcov2',
|
||||||
'-networkFilter',
|
'-i',
|
||||||
'src/',
|
'src/',
|
||||||
'-networkPrefix',
|
'-k',
|
||||||
'build/',
|
'build/',
|
||||||
'-B',
|
'-B',
|
||||||
'thomasrockhu/test',
|
'thomasrockhu/test',
|
||||||
@@ -123,18 +122,18 @@ test('all arguments', () => {
|
|||||||
'coverage/',
|
'coverage/',
|
||||||
'-r',
|
'-r',
|
||||||
'fakeOwner/fakeRepo',
|
'fakeOwner/fakeRepo',
|
||||||
'-xs',
|
'--xs',
|
||||||
'-xsp',
|
'--xsp',
|
||||||
'MyApp',
|
'MyApp',
|
||||||
'-U',
|
'-U',
|
||||||
'https://codecov.example.com',
|
'https://codecov.example.com',
|
||||||
'-u',
|
'-u',
|
||||||
'https://codecov.enterprise.com',
|
'https://codecov.enterprise.com',
|
||||||
'-v',
|
'-v',
|
||||||
'-xc',
|
'--xc',
|
||||||
'-xp',
|
'--xp',
|
||||||
'/test.xcresult',
|
'/test.xcresult',
|
||||||
'-some -other -args',
|
'--some --other --args',
|
||||||
]);
|
]);
|
||||||
expect(failCi).toBeTruthy();
|
expect(failCi).toBeTruthy();
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ const buildExec = () => {
|
|||||||
const upstream = core.getInput('upstream_proxy');
|
const upstream = core.getInput('upstream_proxy');
|
||||||
const url = core.getInput('url');
|
const url = core.getInput('url');
|
||||||
const verbose = isTrue(core.getInput('verbose'));
|
const verbose = isTrue(core.getInput('verbose'));
|
||||||
|
const workingDir = core.getInput('working-directory');
|
||||||
const xcode = core.getInput('xcode');
|
const xcode = core.getInput('xcode');
|
||||||
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||||||
const xtraArgs = core.getInput('xtra_args');
|
const xtraArgs = core.getInput('xtra_args');
|
||||||
@@ -114,7 +115,7 @@ const buildExec = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (fullReport) {
|
if (fullReport) {
|
||||||
execArgs.push('-full', `${fullReport}`);
|
execArgs.push('--full', `${fullReport}`);
|
||||||
}
|
}
|
||||||
if (flags) {
|
if (flags) {
|
||||||
flags.split(',').map((f) => f.trim()).forEach((f) => {
|
flags.split(',').map((f) => f.trim()).forEach((f) => {
|
||||||
@@ -126,23 +127,23 @@ const buildExec = () => {
|
|||||||
execArgs.push('-g');
|
execArgs.push('-g');
|
||||||
}
|
}
|
||||||
if (gcovArgs) {
|
if (gcovArgs) {
|
||||||
execArgs.push('-gcovArgs', `${gcovArgs}`);
|
execArgs.push('--ga', `${gcovArgs}`);
|
||||||
}
|
}
|
||||||
if (gcovIgnore) {
|
if (gcovIgnore) {
|
||||||
execArgs.push('-gcovIgnore', `${gcovIgnore}`);
|
execArgs.push('--gi', `${gcovIgnore}`);
|
||||||
}
|
}
|
||||||
if (gcovInclude) {
|
if (gcovInclude) {
|
||||||
execArgs.push('-gcovInclude', `${gcovInclude}`);
|
execArgs.push('--gI', `${gcovInclude}`);
|
||||||
}
|
}
|
||||||
if (gcovExecutable) {
|
if (gcovExecutable) {
|
||||||
execArgs.push('-gcovExecutable', `${gcovExecutable}`);
|
execArgs.push('--gx', `${gcovExecutable}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (networkFilter) {
|
if (networkFilter) {
|
||||||
execArgs.push('-networkFilter', `${networkFilter}`);
|
execArgs.push('-i', `${networkFilter}`);
|
||||||
}
|
}
|
||||||
if (networkPrefix) {
|
if (networkPrefix) {
|
||||||
execArgs.push('-networkPrefix', `${networkPrefix}`);
|
execArgs.push('-k', `${networkPrefix}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overrideBranch) {
|
if (overrideBranch) {
|
||||||
@@ -179,10 +180,10 @@ const buildExec = () => {
|
|||||||
execArgs.push('-r', `${slug}`);
|
execArgs.push('-r', `${slug}`);
|
||||||
}
|
}
|
||||||
if (swift) {
|
if (swift) {
|
||||||
execArgs.push('-xs');
|
execArgs.push('--xs');
|
||||||
}
|
}
|
||||||
if (swift && swiftProject) {
|
if (swift && swiftProject) {
|
||||||
execArgs.push('-xsp', `${swiftProject}`);
|
execArgs.push('--xsp', `${swiftProject}`);
|
||||||
}
|
}
|
||||||
if (upstream) {
|
if (upstream) {
|
||||||
execArgs.push('-U', `${upstream}`);
|
execArgs.push('-U', `${upstream}`);
|
||||||
@@ -194,8 +195,8 @@ const buildExec = () => {
|
|||||||
execArgs.push('-v');
|
execArgs.push('-v');
|
||||||
}
|
}
|
||||||
if (xcode && xcodeArchivePath) {
|
if (xcode && xcodeArchivePath) {
|
||||||
execArgs.push('-xc');
|
execArgs.push('--xc');
|
||||||
execArgs.push('-xp', `${xcodeArchivePath}`);
|
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uploaderVersion == '') {
|
if (uploaderVersion == '') {
|
||||||
@@ -206,6 +207,10 @@ const buildExec = () => {
|
|||||||
console.debug({execArgs});
|
console.debug({execArgs});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (workingDir) {
|
||||||
|
options.cwd = workingDir;
|
||||||
|
}
|
||||||
|
|
||||||
if (xtraArgs) {
|
if (xtraArgs) {
|
||||||
execArgs.push(`${xtraArgs}`);
|
execArgs.push(`${xtraArgs}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ test('getBaseUrl', () => {
|
|||||||
expect(PLATFORMS.map((platform) => {
|
expect(PLATFORMS.map((platform) => {
|
||||||
return getBaseUrl(platform, 'latest');
|
return getBaseUrl(platform, 'latest');
|
||||||
})).toEqual([
|
})).toEqual([
|
||||||
|
'https://uploader.codecov.io/latest/aarch64/codecov',
|
||||||
'https://uploader.codecov.io/latest/alpine/codecov',
|
'https://uploader.codecov.io/latest/alpine/codecov',
|
||||||
'https://uploader.codecov.io/latest/linux/codecov',
|
'https://uploader.codecov.io/latest/linux/codecov',
|
||||||
'https://uploader.codecov.io/latest/macos/codecov',
|
'https://uploader.codecov.io/latest/macos/codecov',
|
||||||
@@ -48,6 +49,7 @@ test('getBaseUrl', () => {
|
|||||||
expect(PLATFORMS.map((platform) => {
|
expect(PLATFORMS.map((platform) => {
|
||||||
return getBaseUrl(platform, 'v0.1.0_8880');
|
return getBaseUrl(platform, 'v0.1.0_8880');
|
||||||
})).toEqual([
|
})).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/alpine/codecov',
|
||||||
'https://uploader.codecov.io/v0.1.0_8880/linux/codecov',
|
'https://uploader.codecov.io/v0.1.0_8880/linux/codecov',
|
||||||
'https://uploader.codecov.io/v0.1.0_8880/macos/codecov',
|
'https://uploader.codecov.io/v0.1.0_8880/macos/codecov',
|
||||||
@@ -58,13 +60,13 @@ test('getBaseUrl', () => {
|
|||||||
test('isWindows', () => {
|
test('isWindows', () => {
|
||||||
expect(PLATFORMS.map((platform) => {
|
expect(PLATFORMS.map((platform) => {
|
||||||
return isWindows(platform);
|
return isWindows(platform);
|
||||||
})).toEqual([false, false, false, true]);
|
})).toEqual([false, false, false, false, true]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('isValidPlatform', () => {
|
test('isValidPlatform', () => {
|
||||||
expect(PLATFORMS.map((platform) => {
|
expect(PLATFORMS.map((platform) => {
|
||||||
return isValidPlatform(platform);
|
return isValidPlatform(platform);
|
||||||
})).toEqual([true, true, true, true]);
|
})).toEqual([true, true, true, true, true]);
|
||||||
|
|
||||||
expect(isValidPlatform('fakeos')).toBeFalsy();
|
expect(isValidPlatform('fakeos')).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import * as core from '@actions/core';
|
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 => {
|
const setFailure = (message: string, failCi: boolean): void => {
|
||||||
failCi ? core.setFailed(message) : core.warning(message);
|
failCi ? core.setFailed(message) : core.warning(message);
|
||||||
|
|||||||
Reference in New Issue
Block a user