Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Couldn't find a repository matching this job. for coverage output sent from within docker container run on Travis-CI #276

Open
tecfu opened this issue Feb 21, 2020 · 1 comment

Comments

@tecfu
Copy link

tecfu commented Feb 21, 2020

Problem:

When attempting to send coverage output to coveralls.io from within a docker container running on travis-CI:

$ npx nyc report --reporter=text-lcov | npx coveralls

I get the following error output:

Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true}

Environment:

continuous integration server: travis-ci
os: linux
dist: trusty

Details:

  • Coverage output originates from an open source nodejs terminal table project on Github
  • The project relies on docker during integration runs, because docker enables testing of Linux distributions (Centos) that aren't available for CI out-of-the-box
  • Running from within docker seems to the cause of the issue

Workaround:

Coverage output is uploaded correctly when token is added via .coveralls.yml

I'd prefer not to use the token in an open source project, but this seems the only way. Unless I can export the CI environment information into the docker container, such that the upload script can detect the CI environment.

Questions:

  • What does the coverage upload script do to discover information that indicates it is being run from within an CI service?
  • How can I export that information into the scope of the docker container (travis-ci, circle-ci), so that I don't have to use a token?
@tecfu
Copy link
Author

tecfu commented Feb 21, 2020

Dockerfile content:

FROM ubuntu:18.04

# Because there is no package cache in the image, you need to run:
RUN apt update

# Install nodejs
RUN apt install curl gnupg -y
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
RUN apt update
RUN apt install -y nodejs

# Install tty-table
RUN apt install git -y
RUN git clone https://www.github.com/tecfu/tty-table

# Install dev dependencies
WORKDIR /tty-table
RUN npm install

# Run unit tests & report coverage
RUN node -v
# RUN npx mocha
RUN npm run coverage
# RUN npm run npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov -t $myToken
RUN npx nyc report --reporter=text-lcov | npx coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant