Skip to content

Commit fc6e8be

Browse files
committed
Add wait_for_boot option
Refs #449
1 parent 9f1c121 commit fc6e8be

File tree

8 files changed

+124
-853
lines changed

8 files changed

+124
-853
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## unreleased
2+
3+
- Add a `wait_for_boot` option (default false, preserving current behavior) to
4+
wait for Simulator to finish booting the requested image before continuing.
5+
16
## v3
27

38
- Breaking: change the default simulator from "model = iPhone 8" to "os = iOS",

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ a device with Apple Developer account, because a Simulator UDID
4242
| `os` | `iOS`, `tvOS`, `watchOS` | OS type of the device |
4343
| `os_version` | `>=14.0` | OS version specification in semver format |
4444
| `udid` | `ABCD-EFGH` | Specific UDID you'd like to launch |
45-
| `erase_before_boot` | `true` | Whether the data should be erased from device before boot. Starting for a clean state helps getting a stable environment for tests |
45+
| `erase_before_boot` | `true` | Whether the data should be erased from device before boot. Starting from a clean state helps getting a stable environment for tests |
46+
| `wait_for_boot` | `false` | Whether the action must wait for the Simulator to finish booting requested image |
4647
| `shutdown_after_job` | `true` | Whether to shutdown the launched Simulator after the workflow job has been finished |
4748

4849
## Outputs

__tests__/main.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ test('boots a device', () => {
1414
cp.execFileSync(nodeProcess, [actionMain], options).toString()
1515
).toContain('Booting device')
1616

17+
process.env['INPUT_WAIT_FOR_BOOT'] = 'true'
18+
expect(
19+
cp.execFileSync(nodeProcess, [actionMain], options).toString()
20+
).toContain('Waiting for device to finish booting')
21+
1722
process.env['INPUT_MODEL'] = 'Pixel 4'
1823
expect(() => cp.execFileSync(nodeProcess, [actionMain], options)).toThrow()
1924
})

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ inputs:
2323
description: Whether the Simulator data should be erased before booting
2424
required: true
2525
default: 'true'
26+
wait_for_boot:
27+
description: >
28+
Whether the action must wait for the Simulator to finish booting requested
29+
image
30+
required: false
31+
default: 'false'
2632
shutdown_after_job:
2733
description: >
2834
Whether the Simulator should be shut down after the job has finished. This

0 commit comments

Comments
 (0)