Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
running iOS only in preparation for merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilchrist-ledger committed May 3, 2022
1 parent 9af839e commit af2df7b
Showing 1 changed file with 15 additions and 64 deletions.
79 changes: 15 additions & 64 deletions .github/workflows/detox-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,18 @@ jobs:
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache
id: yarn-cache-dir
run: echo "::set-output name=yarn-cache-dir::$(yarn cache dir)"

- name: Restore cache
id: yarn-cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.yarn-cache-dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-

- name: Has hash commit deps
uses: ledgerhq/actions/packages/has-hash-commit-deps@main
Expand All @@ -55,9 +66,9 @@ jobs:
JOBS: max
run: yarn --prefer-offline --frozen-lockfile --network-timeout 100000

# - name: Rebuild detox
# if: ${{ steps.yarn-cache.outputs.cache-hit == 'true' }}
# run: yarn detox clean-framework-cache && yarn detox build-framework-cache
- name: Rebuild detox
if: ${{ steps.yarn-cache.outputs.cache-hit == 'true' }}
run: yarn detox clean-framework-cache && yarn detox build-framework-cache

- name: Build iOS app for detox test run
env:
Expand All @@ -74,63 +85,3 @@ jobs:
with:
name: test-ios-artifacts
path: artifacts

android:
runs-on: macos-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'

- name: Check hash commit deps
uses: ledgerhq/actions/packages/has-hash-commit-deps@main
id: has-hash-commit-deps
with:
workspace: ${{ github.workspace }}

- name: Install dependencies
if: ${{ steps.has-hash-commit-deps.outputs.has-hash-commit-deps == 'true' }}
env:
JOBS: max
run: yarn --prefer-offline --frozen-lockfile --network-timeout 100000 --network-concurrency 1

- name: install dependencies
if: ${{ steps.has-hash-commit-deps.outputs.has-hash-commit-deps == 'false' }}
env:
JOBS: max
run: yarn --prefer-offline --frozen-lockfile --network-timeout 100000

- name: Build Android app for Detox test run
env:
NODE_OPTIONS: "--max-old-space-size=7168"
run: yarn e2e:build -c android.staging-ci

- name: Run Android tests
timeout-minutes: 20
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
# force-avd-creation: false
avd-name: Nexus_6_API_30
emulator-options: -verbose -no-boot-anim -noaudio
ram-size: 2048
script: |
mkdir ./temp
curl -f -o ./temp/test-butler-app.apk https://repo1.maven.org/maven2/com/linkedin/testbutler/test-butler-app/2.2.1/test-butler-app-2.2.1.apk
adb install ./temp/test-butler-app.apk || adb install ./e2e/test-butler-app.apk
yarn e2e:test -c android.staging-ci --loglevel verbose --record-logs failing --record-timeline all --take-screenshots all --record-videos failing --detectOpenHandles
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: test-android-artifacts
path: artifacts

0 comments on commit af2df7b

Please sign in to comment.