Giter VIP home page Giter VIP logo

Comments (3)

shamshirz avatar shamshirz commented on August 16, 2024 1

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.

shamshirz avatar shamshirz commented on August 16, 2024

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.

miguelnietoa avatar miguelnietoa commented on August 16, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.