-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08aa1cc
commit 475b587
Showing
1 changed file
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
@@ -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' | ||
|
@@ -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) | ||
|
@@ -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' | ||
|
@@ -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 | ||
|
@@ -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" \ | ||
|
@@ -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 | ||
|