-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.43 KB
/
Copy pathtests.yml
File metadata and controls
54 lines (45 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: macos-26
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install XcodeGen
run: brew install xcodegen
- name: Xcode version
run: xcodebuild -version
- name: Boot the newest available iPhone simulator
run: |
UDID=$(xcrun simctl list devices available --json | python3 -c "
import json, sys
data = json.load(sys.stdin)['devices']
candidates = []
for runtime, devices in data.items():
if '.iOS-' not in runtime:
continue
version = tuple(int(p) for p in runtime.rsplit('iOS-', 1)[-1].split('-'))
for d in devices:
if d.get('isAvailable') and d['name'].startswith('iPhone'):
candidates.append((version, d['name'], d['udid']))
candidates.sort()
print(candidates[-1][2])
")
xcrun simctl boot "$UDID"
xcrun simctl list devices booted
echo "SIM_UDID=$UDID" >> "$GITHUB_ENV"
- name: Run StepBackCore package tests
run: make test-core
- name: Run app unit tests
run: make test-app-unit SIM_DEST="platform=iOS Simulator,id=$SIM_UDID"