mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-09 00:26:25 +00:00
Merge pull request #699 from codecov/feat-xcode
feat: add xcode support
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
## 3.1.0
|
||||||
|
### Features
|
||||||
|
- #699 Incorporate `xcode` arguments for the Codecov uploader
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
- #694 build(deps-dev): bump @vercel/ncc from 0.33.3 to 0.33.4
|
||||||
|
- #696 build(deps-dev): bump @types/node from 17.0.23 to 17.0.25
|
||||||
|
- #698 build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
- #689 Bump to node16 and small fixes
|
- #689 Bump to node16 and small fixes
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -61,10 +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
|
| `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
|
| `functionalities` | Toggle functionalities | Optional
|
||||||
| | `network` Disable uploading the file network |
|
| | `network` Disable uploading the file network |
|
||||||
| `gcov` | Run with gcov support |
|
| `gcov` | Run with gcov support | Optional
|
||||||
| `gcov_args` | Extra arguments to pass to gcov |
|
| `gcov_args` | Extra arguments to pass to gcov | Optional
|
||||||
| `gcov_ignore` | Paths to ignore during gcov gathering |
|
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional
|
||||||
| `gcov_include` | Paths to include during gcov gathering |
|
| `gcov_include` | Paths to include during gcov gathering | Optional
|
||||||
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
|
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
|
||||||
| `name` | Custom defined name for the upload | Optional
|
| `name` | Custom defined name for the upload | Optional
|
||||||
| `override_branch` | Specify the branch name | Optional
|
| `override_branch` | Specify the branch name | Optional
|
||||||
@@ -79,6 +79,9 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
|
|||||||
| `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
|
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
|
||||||
|
| `xcode` | Run with xcode support | Optional
|
||||||
|
| `xcode_archive_path` | Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult | Optional
|
||||||
|
|
||||||
|
|
||||||
### Example `workflow.yml` with Codecov Action
|
### Example `workflow.yml` with Codecov Action
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,12 @@ inputs:
|
|||||||
working-directory:
|
working-directory:
|
||||||
description: 'Directory in which to execute codecov.sh'
|
description: 'Directory in which to execute codecov.sh'
|
||||||
required: false
|
required: false
|
||||||
|
xcode:
|
||||||
|
description: 'Run with xcode support'
|
||||||
|
required: false
|
||||||
|
xcode_archive_path:
|
||||||
|
description: 'Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult'
|
||||||
|
required: false
|
||||||
branding:
|
branding:
|
||||||
color: 'red'
|
color: 'red'
|
||||||
icon: 'umbrella'
|
icon: 'umbrella'
|
||||||
|
|||||||
8
dist/index.js
vendored
8
dist/index.js
vendored
@@ -19346,7 +19346,7 @@ var core = __nccwpck_require__(2186);
|
|||||||
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
||||||
var github = __nccwpck_require__(5438);
|
var github = __nccwpck_require__(5438);
|
||||||
;// CONCATENATED MODULE: ./package.json
|
;// CONCATENATED MODULE: ./package.json
|
||||||
const package_namespaceObject = {"i8":"3.0.0"};
|
const package_namespaceObject = {"i8":"3.1.0"};
|
||||||
;// CONCATENATED MODULE: ./src/buildExec.ts
|
;// CONCATENATED MODULE: ./src/buildExec.ts
|
||||||
|
|
||||||
|
|
||||||
@@ -19389,6 +19389,8 @@ const buildExec = () => {
|
|||||||
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 workingDir = core.getInput('working-directory');
|
||||||
|
const xcode = core.getInput('xcode');
|
||||||
|
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||||||
const execArgs = [];
|
const execArgs = [];
|
||||||
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
|
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
|
||||||
const options = {};
|
const options = {};
|
||||||
@@ -19496,6 +19498,10 @@ const buildExec = () => {
|
|||||||
if (workingDir) {
|
if (workingDir) {
|
||||||
options.cwd = workingDir;
|
options.cwd = workingDir;
|
||||||
}
|
}
|
||||||
|
if (xcode && xcodeArchivePath) {
|
||||||
|
execArgs.push('--xc');
|
||||||
|
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||||
|
}
|
||||||
if (uploaderVersion == '') {
|
if (uploaderVersion == '') {
|
||||||
uploaderVersion = 'latest';
|
uploaderVersion = 'latest';
|
||||||
}
|
}
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/sourcemap-register.js
vendored
2
dist/sourcemap-register.js
vendored
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.6.0",
|
"@actions/core": "^1.6.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codecov-action",
|
"name": "codecov-action",
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"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": {
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ test('all arguments', () => {
|
|||||||
'url': 'https://codecov.enterprise.com',
|
'url': 'https://codecov.enterprise.com',
|
||||||
'verbose': 't',
|
'verbose': 't',
|
||||||
'working-directory': 'src',
|
'working-directory': 'src',
|
||||||
|
'xcode': 'true',
|
||||||
|
'xcode_archive_path': '/test.xcresult',
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const env of Object.keys(envs)) {
|
for (const env of Object.keys(envs)) {
|
||||||
@@ -110,6 +112,9 @@ test('all arguments', () => {
|
|||||||
'-u',
|
'-u',
|
||||||
'https://codecov.enterprise.com',
|
'https://codecov.enterprise.com',
|
||||||
'-v',
|
'-v',
|
||||||
|
'--xc',
|
||||||
|
'--xp',
|
||||||
|
'/test.xcresult',
|
||||||
]);
|
]);
|
||||||
expect(failCi).toBeTruthy();
|
expect(failCi).toBeTruthy();
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ const buildExec = () => {
|
|||||||
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 workingDir = core.getInput('working-directory');
|
||||||
|
const xcode = core.getInput('xcode');
|
||||||
|
const xcodeArchivePath = core.getInput('xcode_archive_path');
|
||||||
|
|
||||||
const execArgs = [];
|
const execArgs = [];
|
||||||
execArgs.push(
|
execArgs.push(
|
||||||
@@ -165,6 +167,10 @@ const buildExec = () => {
|
|||||||
if (workingDir) {
|
if (workingDir) {
|
||||||
options.cwd = workingDir;
|
options.cwd = workingDir;
|
||||||
}
|
}
|
||||||
|
if (xcode && xcodeArchivePath) {
|
||||||
|
execArgs.push('--xc');
|
||||||
|
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (uploaderVersion == '') {
|
if (uploaderVersion == '') {
|
||||||
uploaderVersion = 'latest';
|
uploaderVersion = 'latest';
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ import {
|
|||||||
setFailure,
|
setFailure,
|
||||||
} from './helpers';
|
} from './helpers';
|
||||||
|
|
||||||
const verify = async (filename: string, platform: string, version: string) => {
|
const verify = async (
|
||||||
|
filename: string,
|
||||||
|
platform: string,
|
||||||
|
version: string,
|
||||||
|
): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
const uploaderName = getUploaderName(platform);
|
const uploaderName = getUploaderName(platform);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as fetch from 'node-fetch';
|
import * as fetch from 'node-fetch';
|
||||||
|
|
||||||
const versionInfo = async (platform: string, version?: string) => {
|
const versionInfo = async (
|
||||||
|
platform: string,
|
||||||
|
version?: string,
|
||||||
|
): Promise<void> => {
|
||||||
if (version) {
|
if (version) {
|
||||||
core.info(`==> Running version ${version}`);
|
core.info(`==> Running version ${version}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user