I've tried many things as well and in the end, the usage of the coverallsapp/github-action@v1.1.2 helped! Now I can successfully publish the coverage results to coveralls.io
Unfortunately, the straightforward approach was either leading to "Bad Response 422 - Couldn't find a repository matching this job" or "Error from lcovParse: 'Failed to parse string'".
Straightforward approach (not working):
-?name:?Publish to coveralls.io
run:?cat?./coverage/lcov.info?|?./node_modules/coveralls/bin/coveralls.js
Using Actions app from GH marketplace (working):
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ github.token }}
This is the working .yml configuration, hope it will help someone else as well.
Keep in mind that the scenario that I needed to cover was a little bit tricky, we have multiple coverage results that needed to be combined and later on used as a single output result to coveralls.io.
If someone is curious, here are the things that I've tried, but failed:
Use of NODE_ENV for publishing -
run: NODE_ENV=test cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
Specifying exact node version 11.8.0 and above
Specifying a github.token, repo and env for the steps:
Creating a separate Github Actions Job.
uses: actions/setup-node@v1
with:
repo-token: ${{ github.token }}
repository: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…