-
Notifications
You must be signed in to change notification settings - Fork 185
Add / update ci retry logic #1332
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,12 +71,22 @@ jobs: | |
| run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV | ||
| - name: Install deps (internal PRs and protected branches) | ||
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }} | ||
| run: yarn install --immutable --silent | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 5 | ||
| command: yarn install --immutable --silent | ||
| env: | ||
| SELFXYZ_INTERNAL_REPO_PAT: ${{ secrets.SELFXYZ_INTERNAL_REPO_PAT }} | ||
| - name: Install deps (forked PRs - no secrets) | ||
| if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }} | ||
| run: yarn install --immutable --silent | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 5 | ||
| command: yarn install --immutable --silent | ||
| - name: Validate Maestro test file | ||
| if: false # Skip for build-only test - keep logic for future E2E | ||
| run: | | ||
|
|
@@ -108,7 +118,12 @@ jobs: | |
| with: | ||
| accept-android-sdk-licenses: true | ||
| - name: Install NDK | ||
| run: sdkmanager "ndk;${{ env.ANDROID_NDK_VERSION }}" | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 15 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 10 | ||
| command: sdkmanager "ndk;${{ env.ANDROID_NDK_VERSION }}" | ||
| - name: Enable KVM group perms | ||
| run: | | ||
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
|
|
@@ -216,12 +231,22 @@ jobs: | |
| run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV | ||
| - name: Install deps (internal PRs and protected branches) | ||
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }} | ||
| run: yarn install --immutable --silent | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 5 | ||
| command: yarn install --immutable --silent | ||
| env: | ||
| SELFXYZ_INTERNAL_REPO_PAT: ${{ secrets.SELFXYZ_INTERNAL_REPO_PAT }} | ||
| - name: Install deps (forked PRs - no secrets) | ||
| if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }} | ||
| run: yarn install --immutable --silent | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 5 | ||
| command: yarn install --immutable --silent | ||
| - name: Validate Maestro test file | ||
| run: | | ||
| [ -f packages/mobile-sdk-demo/tests/e2e/launch.ios.flow.yaml ] || { echo "❌ iOS E2E test file missing"; exit 1; } | ||
|
|
@@ -233,7 +258,12 @@ jobs: | |
| key: ${{ runner.os }}-maestro-${{ env.MAESTRO_VERSION }} | ||
| - name: Install Maestro | ||
| if: steps.cache-maestro.outputs.cache-hit != 'true' | ||
| run: curl -Ls "https://get.maestro.mobile.dev" | bash | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 5 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 10 | ||
| command: curl -Ls "https://get.maestro.mobile.dev" | bash | ||
| - name: Add Maestro to path | ||
| run: echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" | ||
| - name: Set up Xcode | ||
|
|
@@ -284,17 +314,21 @@ jobs: | |
| yarn workspace mobile-sdk-demo run prebuild || { echo "❌ Dependency build failed"; exit 1; } | ||
| echo "✅ Dependencies built successfully" | ||
| - name: Install iOS dependencies | ||
| uses: nick-fields/retry@v3 | ||
| with: | ||
| timeout_minutes: 20 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 10 | ||
| command: | | ||
| if [ -n "${SELFXYZ_INTERNAL_REPO_PAT}" ]; then | ||
| echo "🔑 Using SELFXYZ_INTERNAL_REPO_PAT for private pod access" | ||
| echo "::add-mask::${SELFXYZ_INTERNAL_REPO_PAT}" | ||
| fi | ||
| cd packages/mobile-sdk-demo/ios | ||
| pod install | ||
| env: | ||
| SELFXYZ_INTERNAL_REPO_PAT: ${{ secrets.SELFXYZ_INTERNAL_REPO_PAT }} | ||
| GIT_TERMINAL_PROMPT: 0 | ||
|
Comment on lines
+317
to
331
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use consistent pod installation script across workflows. This file uses direct Align the pod install approach: Option A: Use the centralized script (recommended for consistency): command: |
if [ -n "${SELFXYZ_INTERNAL_REPO_PAT}" ]; then
echo "🔑 Using SELFXYZ_INTERNAL_REPO_PAT for private pod access"
echo "::add-mask::${SELFXYZ_INTERNAL_REPO_PAT}"
fi
cd packages/mobile-sdk-demo/ios
- pod install
+ bundle exec bash ../../app/scripts/pod-install-with-cache-fix.shOption B: Or document why the demo uses direct
🤖 Prompt for AI Agents |
||
| run: | | ||
| echo "Installing iOS dependencies..." | ||
| if [ -n "${SELFXYZ_INTERNAL_REPO_PAT}" ]; then | ||
| echo "🔑 Using SELFXYZ_INTERNAL_REPO_PAT for private pod access" | ||
| echo "::add-mask::${SELFXYZ_INTERNAL_REPO_PAT}" | ||
| fi | ||
| cd packages/mobile-sdk-demo/ios | ||
| pod install | ||
| - name: Setup iOS Simulator | ||
| run: | | ||
| echo "Setting up iOS Simulator..." | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent NDK retry configuration across workflows.
This file uses
max_attempts: 3for NDK installation (line 451), whilemobile-deploy.yml(line 1065) usesmax_attempts: 5. Standardize retry parameters across workflows unless deployment context justifies higher retry count.Consider standardizing NDK retry attempts to 3 or 5 consistently, or add a comment explaining why deployment workflows need more retries.
🤖 Prompt for AI Agents