mirror of
https://github.com/codecov/codecov-action.git
synced 2026-03-29 17:35:06 +00:00
feat: add xcode support
This commit is contained in:
@@ -53,6 +53,8 @@ test('all arguments', () => {
|
||||
'url': 'https://codecov.enterprise.com',
|
||||
'verbose': 't',
|
||||
'working-directory': 'src',
|
||||
'xcode': 'true',
|
||||
'xcode_archive_path': '/test.xcresult',
|
||||
};
|
||||
|
||||
for (const env of Object.keys(envs)) {
|
||||
@@ -110,6 +112,9 @@ test('all arguments', () => {
|
||||
'-u',
|
||||
'https://codecov.enterprise.com',
|
||||
'-v',
|
||||
'--xc',
|
||||
'--xp',
|
||||
'/test.xcresult',
|
||||
]);
|
||||
expect(failCi).toBeTruthy();
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ const buildExec = () => {
|
||||
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 execArgs = [];
|
||||
execArgs.push(
|
||||
@@ -165,6 +167,10 @@ const buildExec = () => {
|
||||
if (workingDir) {
|
||||
options.cwd = workingDir;
|
||||
}
|
||||
if (xcode && xcodeArchivePath) {
|
||||
execArgs.push('--xc');
|
||||
execArgs.push('--xp', `${xcodeArchivePath}`);
|
||||
}
|
||||
|
||||
if (uploaderVersion == '') {
|
||||
uploaderVersion = 'latest';
|
||||
|
||||
@@ -12,7 +12,11 @@ import {
|
||||
setFailure,
|
||||
} from './helpers';
|
||||
|
||||
const verify = async (filename: string, platform: string, version: string) => {
|
||||
const verify = async (
|
||||
filename: string,
|
||||
platform: string,
|
||||
version: string,
|
||||
): Promise<void> => {
|
||||
try {
|
||||
const uploaderName = getUploaderName(platform);
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as fetch from 'node-fetch';
|
||||
|
||||
const versionInfo = async (platform: string, version?: string) => {
|
||||
const versionInfo = async (
|
||||
platform: string,
|
||||
version?: string,
|
||||
): Promise<void> => {
|
||||
if (version) {
|
||||
core.info(`==> Running version ${version}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user