Skip to content

Commit

Permalink
run e2e tests in pr
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi committed Sep 19, 2024
1 parent 98f4526 commit 520c931
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
9 changes: 4 additions & 5 deletions .github/actions/maestro-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ runs:
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
- name: Start Metro in debug
shell: bash
if: ${{ input.flavor == "debug" }}
run: yarn start &
- name: Run e2e tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 24
arch: x86
script: |
if [[ "${{ inputs.flavor }}" == debug ]]; then
echo "Running Metro in backgroud"
yarn start &
fi
echo "Install APK from ${{ inputs.app-path }}"
adb install "${{ inputs.app-path }}"
Expand Down
10 changes: 4 additions & 6 deletions .github/actions/maestro-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ runs:
with:
java-version: '17'
distribution: 'zulu'
- name: Start Metro in Debug
shell: bash
if: ${{ input.flavor == "Debug" }}
run: yarn start &
- name: Run tests
id: run-tests
shell: bash
Expand All @@ -41,12 +45,6 @@ runs:
# Maestro can fail in case of flakyness, we have some retry logic.
set +e
# Start metro in Debug mode
if [[ ${{ inputs.flavor }} == "Debug" ]]; then
echo "Starting Metro in background..."
yarn start &
fi
echo "Launching iOS Simulator: iPhone 15 Pro"
xcrun simctl boot "iPhone 15 Pro"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

test_e2e_ios_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
# if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
runs-on: macos-13
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
flavor: ${{ matrix.flavor }}

test_e2e_ios_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
# if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
runs-on: macos-13
needs: build_npm_package
env:
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
flavor: ${{ matrix.flavor }}

test_e2e_android_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
# if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
runs-on: 4-core-ubuntu
needs: build_npm_package
continue-on-error: true
Expand Down Expand Up @@ -396,10 +396,10 @@ jobs:
uses: ./.github/actions/build-android
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
run-e2e-tests: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
run-e2e-tests: true # ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}

test_e2e_android_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
# if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
runs-on: ubuntu-latest
needs: [build_android]
strategy:
Expand Down

0 comments on commit 520c931

Please sign in to comment.