Comments (5)
I've started using Codecov with GitHub Actions (on this test project for now) and I'm wondering what's the best practice for matrix builds!?
This particular project tests the code against 3 different Node.js version and with my current workflow I'm uploading 3 different coverage reports (but they are always the same):
This doesn't make much sense to me. Ideally, only one coverage report would be uploaded.
Now, I understand I can add an if
statement to the upload step like @jhidding mentioned in the original post, but somehow that feels like a hacky solution.
What is the recommended best practice to upload the coverage report only once independently of the number of jobs due to matrix configurations in GitHub actions?
from codecov-action.
Multiple Node.js and multiple OS
Expand on what @jhidding and @rfgamaral have said. If you are testing on multiple Node.js versions and multiple OS at the same time, something like this will work:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.x, 12.x, 14.x]
runs-on: ${{ matrix.os }}
steps:
- name: Post Coverage
uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10.x'
This posts the coverage reports to Codecov, only when the OS is ubuntu-latest
and the Node.js version is 10.x
. Just change if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10.x'
based on your own setup.
Result
The Post Coverage
is skipped when the OS or the Node.js version does not match:
Two subdirectories Default
and Container
have posted their reports once only (otherwise there will be 12 builds here):
from codecov-action.
Github Actions gives a connection time-out, retries after 30 seconds end-so-on.
from codecov-action.
Hello @jhidding, thank you for bringing this up!
Regarding your issue about how uploads often fail after the first one
- could you elaborate more on this? What error do you see on the console? Uploads to Codecov shouldn't fail after the first build in the matrix, but if that's the case, perhaps we need to investigate this issue on our end because other users might be affected by it
from codecov-action.
@jhidding Any updates on this particular issue? If the problem still persists, we can punch in a support ticket
from codecov-action.
Related Issues (20)
- Using to tokenless upload although a token is given HOT 1
- Question: OIDC auth and tokenless HOT 6
- Codecov token not found multiple tries HOT 14
- Uploads failing with Server Error (500) HOT 5
- "Ignore paths" not working with custom Codecov config file location HOT 1
- Allow codecov upload with token on PRs from forks HOT 3
- Undocumented dependencies of v4 while running in a container
- v4.5.0 missing from `codecov-action/releases` page HOT 1
- Not valid tokenless upload HOT 29
- how to enable openid connect with codecov and github actions? HOT 2
- Upload failing despite same/correct secret HOT 9
- Mark the token for masking in GHA logs
- ------- accidental
- Error: `Commit creating failed: {"detail":"You do not have permission to perform this action."}` HOT 2
- Request failed after too many retries HOT 3
- [v4] How to specify gcov options
- Unable to specify coverage reports flags per file HOT 1
- Codecov v4 - pull_request_review not trigger codecov build
- [CPU] Better CPU architecture detection
- Not valid tokenless upload even with a token HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codecov-action.