Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions Coveralls failing to upload multiple coverage files for ruby parallel specs #176

Open
Nealsoni00 opened this issue May 24, 2023 · 7 comments

Comments

@Nealsoni00
Copy link

Nealsoni00 commented May 24, 2023

Hey all!

Files that are created:

apps/ruby/api/coverage/lcov-1.info
apps/ruby/api/coverage/lcov-2.info
apps/ruby/api/coverage/lcov-3.info
apps/ruby/api/coverage/lcov-4.info
apps/ruby/api/coverage/lcov-5.info

Github Action Runner Command:

      - name: Coveralls GitHub Action
        uses: coverallsapp/[email protected]
        with:
          base-path: "apps/ruby/api"
          github-token: ${{ secrets.GITHUB_TOKEN }}
          debug: true
          allow-empty: true

I have tried all base path combinations and even removing it — same error as below

Runner Type: ARM Linux

Error on GitHub action run:

Run coverallsapp/[email protected]
  with:
    base-path: apps/ruby/api
    github-token: ***
    debug: true
    allow-empty: true
    coveralls-endpoint: https://coveralls.io
Run mkdir -p ~/bin/
  mkdir -p ~/bin/
  cd ~/bin/
  curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux.tar.gz
  curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt
  cat coveralls-checksums.txt | grep coveralls-linux.tar.gz | sha[2](https://github.com/team/actions/runs/5062916311/jobs/9088979319?pr=625#step:8:2)56sum --check
  tar -xzf coveralls-linux.tar.gz
  rm coveralls-checksums.txt
  echo ~/bin >> $GITHUB_PATH
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
coveralls-linux.tar.gz: OK
Run coveralls --debug --allow-empty --base-path apps/ruby/api  
  coveralls --debug --allow-empty --base-path apps/ruby/api  
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    COVERALLS_DEBUG: true
    COVERALLS_CARRYFORWARD_FLAGS: 
    COVERALLS_FLAG_NAME: 
    COVERALLS_PARALLEL: 
    COVERALLS_ENDPOINT: https://coveralls.io
    COVERALLS_GIT_BRANCH: 
    COVERALLS_GIT_COMMIT: 
    COVERALLS_REPO_TOKEN: ***
    COVERALLS_COMPARE_REF: 
    COVERALLS_COMPARE_SHA: 
    COVERALLS_SOURCE_HEADER: github-action
/runner/_work/_temp/4ea201b2-fb18-482[3](https://github.com/team/actions/runs/5062916311/jobs/9088979319?pr=625#step:8:3)-bc7[5](https://github.com/team/actions/runs/5062916311/jobs/9088979319?pr=625#step:8:5)-e8911a8eb7c0.sh: line 1: /home/runner/bin/coveralls: Input/output error
Error: Process completed with exit code 12[6](https://github.com/team/actions/runs/5062916311/jobs/9088979319?pr=625#step:8:6).

Any help would be greatly appreciated!

@mrexox
Copy link
Contributor

mrexox commented May 26, 2023

Runner Type: ARM Linux

Hey! Unfortunately v2 version of Github action does not support ARM platform yet. I can recommend you switching to v1 or changing the platform to AMD64.

This is related to the issues with cross-compilation of the coverage-reporter, the tool we use to report coverage. We are working on it, but unfortunately I can't say when this issue will be resolved.

@Nealsoni00
Copy link
Author

Nealsoni00 commented May 31, 2023

Appreciate the response! How do i upload multiple files in a given folder on the v1 of the runner?

I have 5 lcov files but only see v1 documetnation for path-to-lcov which seems to imply only a single file can be sent?

@mrexox
Copy link
Contributor

mrexox commented Jun 1, 2023

Right, let me suggest you a way to report multiple files - just report them one by one with parallel: true option.

- uses: coverallsapp/github-action@v1
  with:
    path-to-lcov: coverage/file1.cov
    flag-name: coverage
    parallel: true

- uses: coverallsapp/github-action@v1
  with:
    path-to-lcov: coverage/file2.cov
    flag-name: coverage
    parallel: true

- uses: coverallsapp/github-action@v1
  with:
    path-to-lcov: coverage/file3.cov
    flag-name: coverage
    parallel: true

- uses: coverallsapp/github-action@v1
  with:
    parallel-finished: true

@Nealsoni00
Copy link
Author

Great idea, only issue is that the number of files is determined by the # of CPUs on the machine, if we ever increase the worker, this will break and be hard to determine. Is there any better way of doing this?

@mrexox
Copy link
Contributor

mrexox commented Jun 6, 2023

Unfortunately, no. It would be much easier with v2 because it joins multiple coverages into one but it is not available on ARM platform right now and won't be available in the nearest future.

@Nealsoni00
Copy link
Author

Any update on support for ARM for v2? This is v frustrating to not able to parallelize tests (would bring test time from 6 minutes to 2 minutes!)

@mrexox
Copy link
Contributor

mrexox commented Jul 27, 2023

Unfortunately, ARM support is not the main priority, so we don't spend enough time on this. This seemed tricky when I tried to compile the coverage-reporter on ARM because Crystal has too little options for creating a statically linked binary. Now it compiles well only on x64 and only in their alpine docker image, so I couldn't compile it even on ARM machine.

But we have a long-term task to rewrite coverage-reporter in either Go or Rust to make it available for more platforms and make the distribution simpler. I can't say when it will be done. That's all the context I have on ARM support 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants