Comments (3)
tl;dr I think yours is equally good 👍 No complaint
Mine: uses: coverallsapp/github-action@v2
for pushing partial coverage and for notifying parallel is done
Yours: mix coveralls.github
for partial coverage and curl
directly for notifying parallel is done
I don't think it makes much difference. If it could've gotten the mix
task to work for both, then I likely would've thought that was the best of both worlds. Additionally in case you run into this, I found that the overhead of running mix test --cover
(equivalent to mix coveralls.X
) was really high! Whether you do a portion of tests or the whole suite, it has to compile all of the files again within the task.
Ultimately, I ended up going back to a non-parallel approach and we only update the coverage badge after merges into main, rather than doing the coverage check as part of each PR.
from excoveralls.
Hey, it's unlikely you are experiencing this problem still, but I was!
Problem
I want to run my partitioned test suite and post a coverage report of the merged partitions. The mix coveralls.github
isn't working and isn't giving me any clues!
Solution
Combination of mix coveralls.lcov
(read: Changed to a different report format) + the coveralls github action.
This psuedo-sample github action below shows how it worked for us.
- For each Test Partition
- Build the coverage report for your partition
- Upload it with the action
- After, use the action to post that the jobs are complete
test:
needs: build
runs-on: ubuntu-latest
name: Test-OTP ${{matrix.otp}}/Elixir ${{matrix.elixir}}/${{matrix.test_partition}}
strategy:
matrix:
test_partition: [1, 2]
otp: [26.1.1]
elixir: [1.15.6]
services:
db: …
steps:
- name: Install OTP and Elixir
- other setup like cache etc…
- name: Run Tests and Generate Coverage Report
run: |
MIX_TEST_PARTITION=${{ matrix.test_partition }} mix coveralls.lcov --partitions 2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Parallel Coverage Report
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{matrix.test_partition}}
parallel: true
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-1,run-2"
Fun keywords that may help others find this:
✅ API Response: {"error":"No build matching CI build number 8453443938 found"}
from excoveralls.
@shamshirz thanks a lot!
When I initially tackled this issue, I constructed the request to Coveralls in the following way:
https://github.com/kommitters/stellar_sdk/blob/d0ad69c4cb021c0da7afb776403d7fb7100effd7/.github/workflows/ci.yml
Would you mind sharing your thoughts on whether your suggested approach might be more effective than mine?
from excoveralls.
Related Issues (20)
- Coveralls is not picking all my files HOT 1
- Coveralls errors out HOT 3
- Github actions fail on scheduled workflows
- Cannot specify subdir with circle
- Is it possible to include HEEX files in the coverage?
- Support --warnings-as-errors option HOT 3
- Reports different results at an umbrella level vs in-app level
- don't ignore `min_coverage` in `mix coveralls.json` HOT 4
- Coveralls reporting does not understand slots
- Story: Please add totals at the bottom of the report for LINES, RELEVANT and MISSED
- Cobertura error when protocols and implementations in codebase HOT 1
- Incompatibility between excoveralls and meck? HOT 4
- Umbrella run ignores config json in root HOT 5
- Protocols fail to consolidate using ExCoveralls HOT 1
- Excoveralls minimum_coverage conflicts with new Elixir changes. Result: Error: Process completed with exit code 3.
- "function ExCoveralls.start/2 is undefined" HOT 3
- Warning in build, CAStore
- Is it possible to export in multiple formats by running the tests once?
- Percentage changed without a reason 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 excoveralls.