Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
Fix coverage for converted SPM projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Bonafonte committed Feb 14, 2020
1 parent b43ab3f commit 2b360f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
3 changes: 0 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ inputs:
sdk:
description: 'Sdk used for building, by default: \"iphonesimulator\" will be used'
required: false
default: "iphonesimulator"
destination:
description: 'Destination for testing, by default: \"platform=iOS Simulator,name=iPhone 11\"'
required: false
default: '\"platform=iOS Simulator,name=iPhone 11\"'
configuration:
description: 'Configuration for testing, by default: \"Debug\"'
required: false
default: '\"Debug\"'
agentVersion:
description: "Version of the Scope agent to use for testing, by default the latest stable"
required: false
Expand Down
6 changes: 2 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ async function run() {
//Read project
const workspace = await getWorkspace();
let xcodeproj = await getXCodeProj();
let isSPM = false;
var projectParameter;

if (workspace) {
Expand All @@ -1015,13 +1014,12 @@ async function run() {
await swiftPackageRun(extraParameters, codePathEnabled, agentVersion);
return;
} else {
isSPM = true;
xcodeproj = await generateProjectFromSPM();
projectParameter = "-project " + xcodeproj;
}
} else {
core.setFailed(
"Unable to find workspace, project or Swift package file. Please set with.workspace or.xcodeproj"
"Unable to find workspace, project or Swift package file. Please set with workspace or xcodeproj"
);
}

Expand Down Expand Up @@ -1157,7 +1155,7 @@ async function run() {
) {
await runScopeCoverageWithSettings(
settings.buildSettings,
isSPM,
false,
scopeFrameworkToolsPath
);
}
Expand Down
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async function run() {
//Read project
const workspace = await getWorkspace();
let xcodeproj = await getXCodeProj();
let isSPM = false;
var projectParameter;

if (workspace) {
Expand All @@ -74,13 +73,12 @@ async function run() {
await swiftPackageRun(extraParameters, codePathEnabled, agentVersion);
return;
} else {
isSPM = true;
xcodeproj = await generateProjectFromSPM();
projectParameter = "-project " + xcodeproj;
}
} else {
core.setFailed(
"Unable to find workspace, project or Swift package file. Please set with.workspace or.xcodeproj"
"Unable to find workspace, project or Swift package file. Please set with workspace or xcodeproj"
);
}

Expand Down Expand Up @@ -216,7 +214,7 @@ async function run() {
) {
await runScopeCoverageWithSettings(
settings.buildSettings,
isSPM,
false,
scopeFrameworkToolsPath
);
}
Expand Down

0 comments on commit 2b360f7

Please sign in to comment.