Skip to content

Commit

Permalink
2 jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall committed Dec 12, 2023
1 parent 8f13d51 commit b6ca9f6
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/e2e-tests-ios.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: E2E tests (ios)

# TODO:
# Skip steps if cached
# Android + iOS maestro tests by environment
# PR flow that includes all testing + build in a different step from maestro
# Cache pods

on:
workflow_dispatch:
push:
Expand All @@ -18,40 +24,48 @@ jobs:
cache: 'yarn'

- uses: actions/cache@v3
id: cache
with:
path: |
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', 'examples/Rn071/src/**') }}

- name: Install npm dependencies (example project)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/
run: yarn install --frozen-lockfile

- name: Install npm dependencies (root)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./
run: yarn install --frozen-lockfile

- name: Setup Ruby
if: steps.cache.outputs.cache-hit != 'true'
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./examples/Rn071/

- name: setup-cocoapods
if: steps.cache.outputs.cache-hit != 'true'
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.11.3

- name: Install CocoaPods
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/
run: |
yarn pods
- name: Select Xcode
if: steps.cache.outputs.cache-hit != 'true'
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer

- name: Build
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/ios/
run: |
set -o pipefail && xcodebuild \
Expand All @@ -62,9 +76,23 @@ jobs:
-configuration "Release" \
| tee xcodebuild.log
e2e-ios:
name: e2e tests
runs-on: macos-13
environment: e2e

steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: cache
with:
path: |
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', 'examples/Rn071/src/**') }}

- uses: mobile-dev-inc/action-maestro-cloud@v1.8.0
# Temp
if: always()
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
Expand Down

0 comments on commit b6ca9f6

Please sign in to comment.