Gitlab CI with react native android

I’m trying to write gitlab-ci.yml for my react native project,
I tried npx react-native run-android --variant=stagingrelease this is giving me error i.e no device connected.

**Following is the code for gitlab-ci.yml : **
image: reactnativecommunity/react-native-android

before_script:

  • npx envinfo
  • npm i

stages:

  • build
  • test
  • deploy

variables:
ANDROID_VARIANT: “stagingrelease”

build:
stage: build
script:
- cd android && chmod +x gradlew
- ./gradlew clean
- cd …
- npx react-native run-android --variant=${ANDROID_VARIANT}

when: manual

artifacts:
paths:
- android/app/build/outputs/

test:
stage: test
script:
- echo “Testing the app”
when: manual

deploy:
stage: deploy
script:

  • sudo gem install fastlane
  • sudo gem install bundler -v 2.4.22
  • sudo bundle install
  • fastlane deploy
    when: manual

the script is there in my package.json file,.