score:2

I solved it for iOS (./ios/fastlane/Fastfile) in the following way:

platform :ios do

  lane :e2e do
    Dir.chdir "../.." do # Navigate to the root of the project where the Detox files are placed.
      sh("detox build --configuration ios.sim.release")
      sh("detox test --configuration ios.sim.release --cleanup")
    end
  end

end

And Android (./android/fastlane/Fastfile):

platform :android do

  lane :e2e do
    Dir.chdir "../.." do # Navigate to the root of the project where the Detox files are placed.
      sh("detox build --configuration android.emu.release")
      sh("detox test --configuration android.emu.release --cleanup")
    end
  end

end

Related Query

More Query from same tag