How to run expo app on travis?

I am trying to run Cypress, an end-to-end integration tool, on Travis CI to test my expo app. Cypress requires the app to be running before it can start testing. What I am currently doing is “npm run web&; npx wait-on http://localhost:19006” which starts the web server and then waits for it to be open before running cypress. What I find is that it indeed starts running the web server on port 19006, as shown here:

But it appears that 19006 is never actually accessible, the wait-on simply times out. If I try to run cypress here, it can’t find anything running at that port. Any ideas what is going on?

Here’s my travis.yml:

language: node_js
node_js:
  - 12
cache:
  directories:
    - ~/.npm
before_script:
  - npm install -g npm@latest
  - npm install -g expo-cli@latest
script:
  - npm ci
  - sudo sysctl fs.inotify.max_user_watches=524288
  - sudo sysctl fs.inotify.max_queued_events=524288
  - sudo sysctl -p
  - npm run web&
  - npm test
  - npx wait-on http://localhost:19006
  - npm run cy:run

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.