I'm trying to set up Coveralls to work with GitHub Actions for a Python project, and although I've reviewed the documentation multiple times and followed all the instructions to the best of my understanding, I'm still facing the following error:
Bad Response 422 {“message”: “Couldn’t find a repository matching this job”, “error”: true}
Here is a minimal version of my YAML file:
name: coveralls
on:
pull_request:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: install requirements
run: |
pip install --upgrade pip
pip install pytest
pip install pytest-cov
pip install -r app/requirements.txt
- name: run tests
run: |
pytest --cov=app
coverage report -m
coverage lcov
- name: upload coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GH_TOKEN }}
path-to-lcov: coverage.lcov
The documentation is not clear enough at this point:
While it suggests that the GitHub token does not require manual specification in your secrets store, it is presented as a recommendation rather than a strict rule. It would be more appropriate to state that "it must not be manually specified", since using a custom variable like
GH_TOKENinstead of the defaultGITHUB_TOKENwill not function properly.That being said, you need to replace this line:
with this line: