mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 14:48:06 -05:00
Add / update ci retry logic (#1332)
* add retry to logic to ci workflows * simplify retry logic
This commit is contained in:
62
.github/workflows/mobile-sdk-demo-e2e.yml
vendored
62
.github/workflows/mobile-sdk-demo-e2e.yml
vendored
@@ -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
|
||||
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..."
|
||||
|
||||
Reference in New Issue
Block a user