Skip to content

Commit

Permalink
envs
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall committed Dec 12, 2023
1 parent 08aa1cc commit 475b587
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/e2e-tests-ios.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
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
Expand All @@ -10,6 +8,10 @@ on:
workflow_dispatch:
push:

env:
APP_PATH: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
PROJECT_NAME: Rn071

jobs:
build-ios:
name: Build
Expand All @@ -22,9 +24,9 @@ jobs:
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/**') }}
${{ env.APP_PATH }}
${{ env.APP_PATH }}.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', 'examples/${{ env.PROJECT_NAME }}/src/**') }}

- uses: actions/setup-node@v3
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -34,7 +36,7 @@ jobs:

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

- name: Install npm dependencies (root)
Expand All @@ -47,7 +49,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./examples/Rn071/
working-directory: ./examples/${{ env.PROJECT_NAME }}/

- name: setup-cocoapods
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -57,7 +59,7 @@ jobs:

- name: Install CocoaPods
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/
working-directory: ./examples/${{ env.PROJECT_NAME }}/
run: |
yarn pods
Expand All @@ -67,11 +69,11 @@ jobs:

- name: Build
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/ios/
working-directory: ./examples/${{ env.PROJECT_NAME }}/ios/
run: |
set -o pipefail && xcodebuild \
-workspace "Rn071.xcworkspace" \
-scheme "Rn071" \
-workspace "${{ env.PROJECT_NAME }}.xcworkspace" \
-scheme "${{ env.PROJECT_NAME }}" \
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \
-derivedDataPath "DerivedData" \
-configuration "Release" \
Expand All @@ -90,15 +92,15 @@ jobs:
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/**') }}
${{ env.APP_PATH }}
${{ env.APP_PATH }}.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', 'examples/${{ env.PROJECT_NAME }}/src/**') }}

- uses: mobile-dev-inc/[email protected]
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
mapping-file: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app.dSYM
app-file: ${{ env.APP_PATH }}
mapping-file: ${{ env.APP_PATH }}.dSYM
include-tags: ios

- name: Upload logs when workflow failed
Expand Down

0 comments on commit 475b587

Please sign in to comment.