-
Notifications
You must be signed in to change notification settings - Fork 384
ci(repo): add e2e testing infrastructure (iOS + Android) #2777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f799820
test: add e2e testing infrastructure (iOS + Android)
testableapple c41ce39
ci(e2e): revert firebase stubs
testableapple e975309
Update stuff
testableapple 406fcad
Fix allure
testableapple 8f53310
Fix format issues
testableapple cb4efd1
Fix allure
testableapple 3be6201
Fix coderabbit findings
testableapple ab04119
Fix allure download link
testableapple 468200e
Resolve comments
testableapple 1541a88
Merge branch 'master' into ci/e2e-testing-infra
testableapple 95bf9af
Add global timeouts
testableapple 67200c3
Use working dir where possible
testableapple 7c06473
Move steps
testableapple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: 'Cache CocoaPods' | ||
| description: 'Cache CocoaPods dependencies for sample_app iOS builds' | ||
| inputs: | ||
| key-suffix: | ||
| description: 'Cache key suffix (e.g. runner.os or iOS version from matrix)' | ||
| required: true | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| sample_app/ios/Pods | ||
| sample_app/ios/Podfile.lock | ||
| ~/Library/Caches/CocoaPods | ||
| key: pods-${{ inputs.key-suffix }}-${{ hashFiles('sample_app/pubspec.lock', 'sample_app/ios/Podfile') }} | ||
| restore-keys: pods-${{ inputs.key-suffix }}- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: 'Cache Gradle' | ||
| description: 'Cache Gradle dependencies for sample_app Android builds' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| sample_app/android/.gradle | ||
| key: gradle-${{ runner.os }}-${{ hashFiles('sample_app/android/gradle/wrapper/gradle-wrapper.properties', 'sample_app/android/app/build.gradle', 'sample_app/android/build.gradle', 'sample_app/android/settings.gradle', '**/pubspec.lock') }} | ||
| restore-keys: gradle-${{ runner.os }}- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: 'Cache Xcode CAS' | ||
| description: 'Persist Xcode compilation cache (LLVM CAS) across CI runs' | ||
| inputs: | ||
| key-suffix: | ||
| description: 'Cache key suffix (e.g. runner.os or iOS version from matrix)' | ||
| required: true | ||
| xcode-version: | ||
| description: 'Xcode version for the cache key' | ||
| required: false | ||
| default: '26.2' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - shell: bash | ||
| run: | | ||
| echo "FLUTTER_XCODE_COMPILATION_CACHE_ENABLE_CACHING=YES" >> "$GITHUB_ENV" | ||
| echo "FLUTTER_XCODE_SWIFT_ENABLE_COMPILE_CACHE=YES" >> "$GITHUB_ENV" | ||
| echo "FLUTTER_XCODE_CLANG_ENABLE_COMPILE_CACHE=YES" >> "$GITHUB_ENV" | ||
| echo "FLUTTER_XCODE_COMPILATION_CACHE_CAS_PATH=$HOME/xcode-cas" >> "$GITHUB_ENV" | ||
| mkdir -p "$HOME/xcode-cas" | ||
| - uses: actions/cache@v6 | ||
| with: | ||
| path: ~/xcode-cas | ||
| key: xcode-cas-${{ inputs.xcode-version }}-${{ inputs.key-suffix }}-${{ hashFiles('sample_app/pubspec.lock', 'sample_app/ios/Podfile', 'sample_app/ios/Runner.xcodeproj/project.pbxproj') }} | ||
| restore-keys: xcode-cas-${{ inputs.xcode-version }}-${{ inputs.key-suffix }}- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: 'Enable KVM' | ||
| description: 'Configure KVM permissions for Android emulator on Linux runners' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Enable KVM | ||
| shell: bash | ||
| run: | | ||
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger --name-match=kvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| name: Package Analysis | ||
| description: Package Analysis | ||
|
|
||
| runs: | ||
| using: "composite" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| name: 'Setup Flutter' | ||
| description: 'Install Flutter with dependency caching' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: subosito/flutter-action@v2 | ||
| with: | ||
| flutter-version: "3.x" | ||
| channel: stable | ||
| cache: true | ||
| cache-key: "flutter-:os:-:channel:-:version:-:arch:" | ||
| pub-cache-key: "flutter-pub-:os:-${{ hashFiles('melos.yaml', '**/pubspec.yaml') }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Setup iOS Runtime | ||
| description: Download and install a requested iOS simulator runtime | ||
| inputs: | ||
| version: | ||
| description: iOS runtime version (e.g. 17.5) | ||
| required: true | ||
| device: | ||
| description: Simulator device type (e.g. iPhone 15 Pro) | ||
| required: true | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install ipsw | ||
| shell: bash | ||
| run: | | ||
| IPSW_VERSION=3.1.592 | ||
| FILE="ipsw_${IPSW_VERSION}_macOS_universal.tar.gz" | ||
| if ! command -v ipsw >/dev/null; then | ||
| wget -q "https://github.com/blacktop/ipsw/releases/download/v${IPSW_VERSION}/${FILE}" | ||
| tar -xzf "$FILE" | ||
| chmod +x ipsw | ||
| sudo mv ipsw /usr/local/bin/ | ||
| rm -f "$FILE" | ||
| fi | ||
|
|
||
| - name: Setup iOS simulator runtime | ||
| shell: bash | ||
| run: sudo rm -rfv ~/Library/Developer/CoreSimulator/* || true | ||
|
|
||
| - name: Install iOS runtime | ||
| shell: bash | ||
| working-directory: sample_app/ios | ||
| run: bundle exec fastlane install_runtime ios:${{ inputs.version }} | ||
|
|
||
| - name: Cleanup iOS runtime install artifacts | ||
| shell: bash | ||
| run: | | ||
| sudo rm -rfv sample_app/*.dmg || true | ||
| xcrun simctl list runtimes | ||
|
|
||
| - name: Create custom iOS simulator | ||
| shell: bash | ||
| run: | | ||
| ios_version_dash=$(echo "${{ inputs.version }}" | tr '.' '-') | ||
| xcrun simctl create custom-test-device "${{ inputs.device }}" "com.apple.CoreSimulator.SimRuntime.iOS-${ios_version_dash}" | ||
| xcrun simctl list devices "${{ inputs.version }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| name: 'Setup Java' | ||
| description: 'Install Java' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: "17" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: 'Setup Ruby' | ||
| description: 'Install Ruby and Cache Gems' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: "3.3" | ||
| bundler-cache: true | ||
| working-directory: sample_app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.