Skip to content

Commit a03184e

Browse files
feat: add xcode support
1 parent 6a6a9ae commit a03184e

12 files changed

+54
-12
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 3.1.0
2+
### Features
3+
- #699 Incorporate `xcode` arguments for the Codecov uploader
4+
5+
### Dependencies
6+
- #694 build(deps-dev): bump @vercel/ncc from 0.33.3 to 0.33.4
7+
- #696 build(deps-dev): bump @types/node from 17.0.23 to 17.0.25
8+
- #698 build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0
9+
110
## 3.0.0
211
### Breaking Changes
312
- #689 Bump to node16 and small fixes

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
6161
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
6262
| `functionalities` | Toggle functionalities | Optional
6363
| | `network` Disable uploading the file network |
64-
| `gcov` | Run with gcov support |
65-
| `gcov_args` | Extra arguments to pass to gcov |
66-
| `gcov_ignore` | Paths to ignore during gcov gathering |
67-
| `gcov_include` | Paths to include during gcov gathering |
64+
| `gcov` | Run with gcov support | Optional
65+
| `gcov_args` | Extra arguments to pass to gcov | Optional
66+
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional
67+
| `gcov_include` | Paths to include during gcov gathering | Optional
6868
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
6969
| `name` | Custom defined name for the upload | Optional
7070
| `override_branch` | Specify the branch name | Optional
@@ -79,6 +79,9 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
7979
| `verbose` | Specify whether the Codecov output should be verbose | Optional
8080
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
8181
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
82+
| `xcode` | Run with xcode support | Optional
83+
| `xcode_archive_path` | Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult | Optional
84+
8285

8386
### Example `workflow.yml` with Codecov Action
8487

action.yml

+6
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ inputs:
8686
working-directory:
8787
description: 'Directory in which to execute codecov.sh'
8888
required: false
89+
xcode:
90+
description: 'Run with xcode support'
91+
required: false
92+
xcode_archive_path:
93+
description: 'Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult'
94+
required: false
8995
branding:
9096
color: 'red'
9197
icon: 'umbrella'

dist/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -19346,7 +19346,7 @@ var core = __nccwpck_require__(2186);
1934619346
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
1934719347
var github = __nccwpck_require__(5438);
1934819348
;// CONCATENATED MODULE: ./package.json
19349-
const package_namespaceObject = {"i8":"3.0.0"};
19349+
const package_namespaceObject = {"i8":"3.1.0"};
1935019350
;// CONCATENATED MODULE: ./src/buildExec.ts
1935119351

1935219352

@@ -19389,6 +19389,8 @@ const buildExec = () => {
1938919389
const url = core.getInput('url');
1939019390
const verbose = isTrue(core.getInput('verbose'));
1939119391
const workingDir = core.getInput('working-directory');
19392+
const xcode = core.getInput('xcode');
19393+
const xcodeArchivePath = core.getInput('xcode_archive_path');
1939219394
const execArgs = [];
1939319395
execArgs.push('-n', `${name}`, '-Q', `github-action-${package_namespaceObject.i8}`);
1939419396
const options = {};
@@ -19496,6 +19498,10 @@ const buildExec = () => {
1949619498
if (workingDir) {
1949719499
options.cwd = workingDir;
1949819500
}
19501+
if (xcode && xcodeArchivePath) {
19502+
execArgs.push('--xc');
19503+
execArgs.push('--xp', `${xcodeArchivePath}`);
19504+
}
1949919505
if (uploaderVersion == '') {
1950019506
uploaderVersion = 'latest';
1950119507
}

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sourcemap-register.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codecov-action",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "Upload coverage reports to Codecov from GitHub Actions",
55
"main": "index.js",
66
"scripts": {

src/buildExec.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ test('all arguments', () => {
5353
'url': 'https://codecov.enterprise.com',
5454
'verbose': 't',
5555
'working-directory': 'src',
56+
'xcode': 'true',
57+
'xcode_archive_path': '/test.xcresult',
5658
};
5759

5860
for (const env of Object.keys(envs)) {
@@ -110,6 +112,9 @@ test('all arguments', () => {
110112
'-u',
111113
'https://codecov.enterprise.com',
112114
'-v',
115+
'--xc',
116+
'--xp',
117+
'/test.xcresult',
113118
]);
114119
expect(failCi).toBeTruthy();
115120

src/buildExec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const buildExec = () => {
4545
const url = core.getInput('url');
4646
const verbose = isTrue(core.getInput('verbose'));
4747
const workingDir = core.getInput('working-directory');
48+
const xcode = core.getInput('xcode');
49+
const xcodeArchivePath = core.getInput('xcode_archive_path');
4850

4951
const execArgs = [];
5052
execArgs.push(
@@ -165,6 +167,10 @@ const buildExec = () => {
165167
if (workingDir) {
166168
options.cwd = workingDir;
167169
}
170+
if (xcode && xcodeArchivePath) {
171+
execArgs.push('--xc');
172+
execArgs.push('--xp', `${xcodeArchivePath}`);
173+
}
168174

169175
if (uploaderVersion == '') {
170176
uploaderVersion = 'latest';

src/validate.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import {
1212
setFailure,
1313
} from './helpers';
1414

15-
const verify = async (filename: string, platform: string, version: string) => {
15+
const verify = async (
16+
filename: string,
17+
platform: string,
18+
version: string,
19+
): Promise<void> => {
1620
try {
1721
const uploaderName = getUploaderName(platform);
1822

src/version.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import * as core from '@actions/core';
22
import * as fetch from 'node-fetch';
33

4-
const versionInfo = async (platform: string, version?: string) => {
4+
const versionInfo = async (
5+
platform: string,
6+
version?: string,
7+
): Promise<void> => {
58
if (version) {
69
core.info(`==> Running version ${version}`);
710
}

0 commit comments

Comments
 (0)