Skip to content

Commit 4cd7a0f

Browse files
authored
ci: run less e2e jobs when when running from PR (#1239)
## 📜 Description Reduced amount of iOS e2e tests for PR. ## 💡 Motivation and Context When we open PR we want to move as quick as possible. Running 2 build jobs + 6 e2e jobs is a very expensive in terms of time (because we have only 5 runners available to use simultaneously). So in this PR I decide to use only 3 jobs for tests: - iOS 15 (prior to this version only TextKit v1 was used, events were more synchronous and we had less strange bugs and less strange events were emitted); - iOS 17 - classically broken iOS version. On this version we have TextKit v2, we have early end events etc. +iOS 17 runner is running fast, so it's our gold standard. - iOS 26 + Xcode 26 - this is a new combination and we need to assure that newest iOS runs without issues/regressions. When we merge into main we run all 6 jobs (just for double verification). To achieve this I added a separate step that prepares a matrix for e2e tests. I've tried other options but this was the only one that was working 🤷‍♂️ ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### CI - run only 3 iOS e2e for PRs; ## 🤔 How Has This Been Tested? Tested manually via this PR. ## 📸 Screenshots (if appropriate): <!-- Add screenshots/video if needed --> <!-- That would be highly appreciated if you can add how it looked before and after your changes --> ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 04670f4 commit 4cd7a0f

File tree

1 file changed

+19
-57
lines changed

1 file changed

+19
-57
lines changed

.github/workflows/ios-e2e-test.yml

Lines changed: 19 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -96,69 +96,31 @@ jobs:
9696
with:
9797
name: ios-e2e-ipa-xcode${{ matrix.config.xcode }}
9898
path: example/ios/build/Build/Products/Release-iphonesimulator/KeyboardControllerExample.app/**
99+
determine-e2e-matrix:
100+
name: ⚖️ Determine E2E Test Matrix
101+
runs-on: ubuntu-latest
102+
outputs:
103+
matrix: ${{ steps.set-matrix.outputs.matrix }}
104+
steps:
105+
- name: Set matrix for PR or main
106+
id: set-matrix
107+
run: |
108+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
109+
# Subset for PRs: Only ios 15, 26, 26e (adjust as needed)
110+
echo 'matrix={"devices": [{"ios": 15, artifact: "16.4", "xcode": "16.4", "macos": 15, "runtime": "15.5", "iphone": "iPhone 13 Pro", "os": "15.5"}, {"ios": 17, artifact: "16.4", "xcode": "16.4", "macos": 15, "runtime": "17.5", "iphone": "iPhone 15 Pro", "os": "17.5"}, {"ios": "26e", artifact: "26.1", "xcode": "26.1", "macos": 26, "iphone": "iPhone 16e", "os": "26.1"}]}' >> $GITHUB_OUTPUT
111+
else
112+
# Full set for main
113+
echo 'matrix={"devices": [{"ios": 15, artifact: "16.4", "xcode": "16.4", "macos": 15, "runtime": "15.5", "iphone": "iPhone 13 Pro", "os": "15.5"}, {"ios": 16, artifact: "16.4", "xcode": "16.4", "macos": 15, "runtime": "16.4", "iphone": "iPhone 14 Pro", "os": "16.4"}, {"ios": 17, artifact: "16.4", "xcode": "16.4", "macos": 15, "runtime": "17.5", "iphone": "iPhone 15 Pro", "os": "17.5"}, {"ios": 18, artifact: "16.4", "xcode": "16.4", "macos": 15, "iphone": "iPhone 16 Pro", "os": "18.5"}, {"ios": 26, artifact: "16.4", "xcode": "26.0", "macos": 26, "iphone": "iPhone 17 Pro", "os": "26.0"}, {"ios": "26e", artifact: "26.1", "xcode": "26.1", "macos": 26, "iphone": "iPhone 16e", "os": "26.1"}]}' >> $GITHUB_OUTPUT
114+
fi
99115
e2e-test:
100-
name: ⚙️ Automated test cases (iOS-${{ matrix.devices.ios }}, XCode-${{ matrix.devices.xcode }})
116+
name: ⚙️ Automated test cases (iOS-${{ matrix.devices.ios }}, XCode-${{ matrix.devices.artifact }})
101117
runs-on: macos-${{ matrix.devices.macos }}
102118
timeout-minutes: 90
103119
env:
104120
WORKING_DIRECTORY: example
105121
strategy:
106-
matrix:
107-
devices:
108-
[
109-
{
110-
ios: 15,
111-
artifact: "16.4",
112-
xcode: "16.4",
113-
macos: 15,
114-
runtime: "15.5",
115-
iphone: "iPhone 13 Pro",
116-
os: "15.5",
117-
},
118-
{
119-
ios: 16,
120-
artifact: "16.4",
121-
xcode: "16.4",
122-
macos: 15,
123-
runtime: "16.4",
124-
iphone: "iPhone 14 Pro",
125-
os: "16.4",
126-
},
127-
{
128-
ios: 17,
129-
artifact: "16.4",
130-
xcode: "16.4",
131-
macos: 15,
132-
runtime: "17.5",
133-
iphone: "iPhone 15 Pro",
134-
os: "17.5",
135-
},
136-
{
137-
ios: 18,
138-
artifact: "16.4",
139-
xcode: "16.4",
140-
macos: 15,
141-
iphone: "iPhone 16 Pro",
142-
os: "18.5",
143-
},
144-
{
145-
ios: 26,
146-
artifact: "16.4",
147-
xcode: "26.1",
148-
macos: 26,
149-
iphone: "iPhone 17 Pro",
150-
os: "26.0",
151-
},
152-
{
153-
ios: "26e",
154-
artifact: "26.1",
155-
xcode: "26.1",
156-
macos: 26,
157-
iphone: "iPhone 16e",
158-
os: "26.1",
159-
},
160-
]
161-
needs: build
122+
matrix: ${{ fromJson(needs.determine-e2e-matrix.outputs.matrix) }}
123+
needs: [build, determine-e2e-matrix]
162124
steps:
163125
- uses: actions/checkout@v4
164126
- name: Download a single artifact

0 commit comments

Comments
 (0)