Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ inputs:
* `address`: Address Sanitizer (ASan) detects memory issues like buffer overflows
Only one sanitizer can be enabled at a time. Leave unset to disable.
required: false
test-iterations:
description: |
Number of times to run each test. This runs each test case multiple times
to help identify flaky tests. Only applies to test actions.
required: false
only-testing:
description: |
Multiline list of tests to run. Each line should be in the format:
TestTarget/TestClass/testMethod or TestTarget/TestClass or TestTarget.
Only these specified tests will be executed.
required: false
skip-testing:
description: |
Multiline list of tests to skip. Each line should be in the format:
TestTarget/TestClass/testMethod or TestTarget/TestClass or TestTarget.
These tests will be excluded from execution.
required: false
result-bundle-path:
description: |
Path where the .xcresult bundle should be written.
If not specified, defaults to `<action>.xcresult` (e.g., `test.xcresult`).
required: false
authentication-key-base64:
description: |
A Base64-encoded authentication key issued by App Store Connect. If
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

24 changes: 20 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ async function main() {
if (configuration) args = args.concat(['-configuration', configuration])
if (apiKey) args = args.concat(apiKey)

args = args.concat([
'-resultBundlePath',
`${action ?? 'xcodebuild'}.xcresult`,
])
const resultBundlePath =
core.getInput('result-bundle-path') ||
`${action ?? 'xcodebuild'}.xcresult`
args = args.concat(['-resultBundlePath', resultBundlePath])

switch (action) {
case 'build':
Expand All @@ -235,6 +235,22 @@ async function main() {
} else if (sanitizer === 'address') {
args = args.concat(['-enableAddressSanitizer', 'YES'])
}
const testIterations = core.getInput('test-iterations')
if (testIterations) {
args = args.concat(['-test-iterations', testIterations])
}
const onlyTesting = core.getMultilineInput('only-testing')
for (const test of onlyTesting) {
if (test.trim()) {
args = args.concat(['-only-testing', test.trim()])
}
}
const skipTesting = core.getMultilineInput('skip-testing')
for (const test of skipTesting) {
if (test.trim()) {
args = args.concat(['-skip-testing', test.trim()])
}
}
break
}
}
Expand Down
Loading