Skip to content

Commit ac2f29f

Browse files
committed
Improvements
1 parent 9634a2e commit ac2f29f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/actions/tests/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ runs:
5555
name: Run spmgraph tests
5656
run: |
5757
# note: changed-files takes precedence over baseBranch
58-
spmgraph tests ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} --baseBranch ${{ github.base_ref || 'main' }} --output ${{ inputs.output-format }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.changed-files && '--changed_files ${{ inputs.changed-files }}' || '' }} ${{ inputs.config-build-directory && '--config-build-directory ${{ inputs.config-build-directory }}' || '' }} ${{ inputs.experimental-ui-test-targets == 'true' && '--experimentalUITest' || '' }}
58+
spmgraph tests ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} --baseBranch ${{ github.base_ref || 'main' }} --output ${{ inputs.output-format }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.changed-files && '--changed-files ${{ inputs.changed-files }}' || '' }} ${{ inputs.config-build-directory && '--config-build-directory ${{ inputs.config-build-directory }}' || '' }} ${{ inputs.experimental-ui-test-targets == 'true' && '--experimentalUITest' || '' }}
5959
if [ ! -s "$GITHUB_WORKSPACE/output.txt" ]; then
6060
echo "tests_needed=false" >> $GITHUB_OUTPUT
6161
else

Sources/SPMGraphTests/SPMGraphTests.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public struct SPMGraphTestsInput {
3838
/// The output mode
3939
let outputMode: SPMGraphTests.OutputMode // TODO: Check if it make sense in the SPMGraphConfig fle
4040
/// Enables support for including UITest targets on selecting testing. It looks for a `uiTestsDependencies.json` in the temporary directory,
41-
/// reads it, and checks if any of the UITest targets dependencies are affected, if so, it includes them in the list of test targets to run."
41+
/// reads it, and checks if any of the UITest targets dependencies are affected, if so, it includes them in the list of test targets to run.
4242
///
4343
/// - warning: This is an experimental flag, use it with caution!
4444
let experimentalUITestTargets: Bool
@@ -198,10 +198,14 @@ public final class SPMGraphTests: SSPMGraphTestsProtocol {
198198
.appending(component: "uiTestsDependencies")
199199
.appending(extension: "json")
200200

201-
print(">>> file path \(uiTestsDependenciesFilePath)")
201+
if input.verbose {
202+
try system.echo("Looking for the UI tests dependencies file at: \(uiTestsDependenciesFilePath)")
203+
}
202204

203205
if localFileSystem.exists(uiTestsDependenciesFilePath) {
204-
print(">>> file exists")
206+
if input.verbose {
207+
try system.echo("Found the UI tests dependencies file at: \(uiTestsDependenciesFilePath)")
208+
}
205209

206210
try localFileSystem.readFileContents(uiTestsDependenciesFilePath)
207211
.withData { data in

0 commit comments

Comments
 (0)