Skip to content

Commit

Permalink
feat: add matrix tests for Flipper/No Flipper
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Sep 5, 2022
1 parent 5c109b3 commit d6075b6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@ jobs:
jsengine:
type: string
default: "Hermes"
flipper:
type: string
default: "WithFlipper"
environment:
- PROJECT_NAME: "iOSTemplateProject"
- HERMES_WS_DIR: *hermes_workspace_root
Expand Down Expand Up @@ -716,7 +719,7 @@ jobs:
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
- run:
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>; Flipper << parameters.flipper >>
command: |
cd /tmp/$PROJECT_NAME
yarn install
Expand All @@ -736,6 +739,10 @@ jobs:
export USE_HERMES=0
fi
if [[ << parameters.flipper >> == "WithoutFlipper" ]]; then
export NO_FLIPPER=1
fi
bundle exec pod install
- run:
name: Build template project
Expand Down Expand Up @@ -1347,6 +1354,12 @@ workflows:
architecture: ["NewArch", "OldArch"]
flavor: ["Debug", "Release"]
jsengine: ["Hermes", "JSC"]
flipper: ["WithFlipper", "WithoutFlipper"]
exlude:
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
- test_ios_rntester:
requires:
- build_hermes_macos
Expand Down
4 changes: 3 additions & 1 deletion template/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ require_relative '../node_modules/react-native/scripts/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

target 'HelloWorld' do
config = use_native_modules!

Expand All @@ -21,7 +23,7 @@ target 'HelloWorld' do
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => FlipperConfiguration.enabled,
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
Expand Down

0 comments on commit d6075b6

Please sign in to comment.