mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-11-02 15:28:09 +00:00
69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
build:
|
|
name: Create a build and run Maestro tests on it
|
|
steps:
|
|
- eas/checkout
|
|
|
|
- run:
|
|
name: Enable corepack
|
|
command: corepack enable
|
|
|
|
# if you are not interested in using custom .npmrc config you can skip it
|
|
- eas/use_npm_token
|
|
|
|
- eas/install_node_modules
|
|
|
|
- eas/resolve_build_config
|
|
|
|
- eas/prebuild
|
|
|
|
- run:
|
|
name: Install pods
|
|
working_directory: ./ios
|
|
command: pod install
|
|
|
|
# if you are not using EAS Update you can remove this step from your config
|
|
# https://docs.expo.dev/eas-update/introduction/
|
|
- eas/configure_eas_update:
|
|
inputs:
|
|
throw_if_not_configured: false
|
|
|
|
- eas/generate_gymfile_from_template
|
|
|
|
- eas/run_fastlane
|
|
|
|
- eas/find_and_upload_build_artifacts
|
|
|
|
- eas/install_maestro
|
|
- eas/start_ios_simulator
|
|
- run:
|
|
command: |
|
|
# shopt -s nullglob is necessary not to try to install
|
|
# SEARCH_PATH literally if there are no matching files.
|
|
shopt -s nullglob
|
|
|
|
SEARCH_PATH="ios/build/Build/Products/*simulator/*.app"
|
|
FILES_FOUND=false
|
|
|
|
for APP_PATH in $SEARCH_PATH; do
|
|
FILES_FOUND=true
|
|
echo "Installing \\"$APP_PATH\\""
|
|
xcrun simctl install booted "$APP_PATH"
|
|
# Trigger biometric enrollment change to allow biometric authentication
|
|
xcrun simctl spawn booted notifyutil -s com.apple.BiometricKit.enrollmentChanged '1' && xcrun simctl spawn booted notifyutil -p com.apple.BiometricKit.enrollmentChanged
|
|
done
|
|
|
|
if ! $FILES_FOUND; then
|
|
echo "No files found matching \\"$SEARCH_PATH\\". Are you sure you've built a Simulator app?"
|
|
exit 1
|
|
fi
|
|
- run:
|
|
command: |
|
|
maestro test --env="IS_DEV_MODE=true" --env="APP_ID=global.safe.mobileapp.ios.dev" e2e
|
|
- eas/upload_artifact:
|
|
name: Upload test artifact
|
|
if: ${ always() }
|
|
inputs:
|
|
type: build-artifact
|
|
path: ${ eas.env.HOME }/.maestro/tests
|
|
|