I’m setting up my server side for NodeJS application which I’m integrating with Travis. I’m using Mocha and NYC with Palo Alto Networks to help with my tests. However, while these tests run fine locally, this is what occurs within Travis:
> firstname.lastname@example.org test /server > nyc --reporter=lcov npm run run-test "--coverage" sh: nyc: Permission denied npm ERR! Test failed. See above for more details. The command "docker run repname/server npm test -- --coverage" exited with 1.
That’s my .travis.yml file:
sudo: required services: - docker before_install: - docker build -t repname/server -f Dockerfile.dev . script: - docker run repname/server npm test -- --coverage
I even tried some of other similar problems find on stack: Thats what I tried with no luck:
before_script: chmod 0555 ./node_modules/.bin/nyc before_script: chmod 0777 ./node_modules/.bin/nyc
before_script: chmod 0555 ./node_modules/.bin/mocha before_script: chmod 0555 ./node_modules/.bin/mocha
thanks for any help!