Tests not running on Travis CI

Hello. The build of my app was passing, then I made a couple of changes. I ran the tests locally, and all the tests passed. However, when I push to Github, it triggers a build on Travis. Travis executes my test script npm run test, but the tests don’t run. I am really confused because I didn’t change my travis configuration or anything. The tests don’t just run. After about 10 minutes of being stalled it displays the following message:
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received The build has been terminated

Here’s an image of the output

Here’s my travis.yml file

language: node_js
node_js:
  - "stable"

cache: 
  directories:
    - node_modules

install:
  - npm install

services:
  - redis-server

after_success:
  - npm run coverage

I would appreciate any help. Thanks!

Hello @georgeben,

Have you tried using travis_wait? Try reading this as well. If you keep having issues don’t hesitate to reach out.

Hey @Montana Thanks for your prompt response. I think the link is broken. However, on my machine, the tests take about 10 seconds to run.

When reporting problems, please consider including:

  1. What you are trying to achieve
  2. What you have tried (probably a link to the configuration)
  3. What happened instead (often, pointing to a build log URL, in the form of https://travis-ci.com/OWNER/REPO/build/NNNNNNN would be helpful).
1 Like

Hello @BanzaiMan,

  1. I am trying to run my tests on Travis.
  2. Travis configuration
  3. Build log

Thank you.

I cloned your repository to a clean Docker image, and followed the steps, and it similarly hangs. I can’t tell what Node/npm is doing, as it just hangs there without any indication. If it’s completing on your machine, your machine probably has something that my Docker image does not.

You have a passing build from 2 years ago. I suggest:

  1. Save the build log https://travis-ci.com/github/georgeben/Report-Missing-People-API/builds/145760671
  2. Restart this build and see if it passes now.
    1. if it does, compare what changed between the passing build and the first failing build.
    2. if it doesn’t, compare the new failing build log and the saved passing build and understand what changed.
  3. tell mocha to be more verbose, maybe

We can also enable the debugging mode for this repository so you may troubleshoot more interactively.