Giter Club home page Giter Club logo

orb's People

Contributors

josegonzalez avatar kyletryon avatar mrexox avatar nickmerwin avatar paulfalgout avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

orb's Issues

Orb exits 1 without any debugging information

Can we have a debug variable that sets set -x if it's available? It isn't super clear what the error is based on the output here...

Screenshot 2023-06-21 at 5 49 52 PM

My config:

- coveralls/upload:
          coverage_file: << parameters.working_directory >>/lcov.info
          coverage_format: lcov

Orb WIP

Hey @joroshiba, not sure if you got my email about it, but do you still have the WIP orb from late last year?

Does this actually work in parallel?

I can't get this orb to work because of #3

But digging in, and trying to manually run what this orb is doing I don't see how this will ever work.

On circleci the jobs in parallel have the same build number, but once the parallel jobs are completed and the job calling the webhook with payload[build_num]=$CIRCLE_BUILD_NUM that job is a new build number. So the result is "{"error":"No build matching CI build number 2757 found"}" And I don't see how the webhook could be called on the parallel job as which parallel job would we do it on? How do we know when all the jobs are completed other than running a new job that depends on the parallel run.

You can see the behavior here: https://circleci.com/workflow-run/6f4fb4ef-59ef-4311-a1dc-1462b7750687

I don't think it's possible for the orb to support parallel builds on circle ci until the build number can support the workspace id which is part of this PR: nickmerwin/node-coveralls#205

Ideally the webhook could use something other than the build number such as the service job id.. that'd make this task at least possible But I don't think this orb is going to work for parallel until fixes are made elsewhere in the ecosystem.

Failing to upload to coveralls in a java based application

Hi,
I'm trying to get this ORB working on a java project built with gradle and I'm trying to upload the jacoco XML report to coveralls.
One thing that is not mentioned in the documentation is that node is required for running this plugin, so it should be installed manually (in my case I'm using a java docker container).

I can correctly export a report in XML however this ORB fails to upload the report to coveralls.
The error is as follows:

/usr/local/bin/coveralls -> /usr/local/lib/node_modules/coveralls/bin/coveralls.js
+ [email protected]
added 55 packages from 80 contributors in 1.913s
[error] "2021-08-09T23:46:41.504Z"  'error from lcovParse: ' 'Failed to parse string'
[error] "2021-08-09T23:46:41.507Z"  'input: ' '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>[...]

/usr/local/lib/node_modules/coveralls/bin/coveralls.js:19
      throw err;
      ^
Failed to parse string

I'm attaching the full log file.
output.log

The project is here: https://github.com/kermitt2/grobid-quantities/tree/feature/coveralls

Thank you in advance

Make release from tag

There is a new tag - 2.1.2 - but would be nice to get a tag. It's what shows up when one lands on the github page, so its easy to miss that a new one doesn't exist.

Orb does not accept ~ for representing home

In some cases, a user might set the path to the coverage file as something like ~/coveralls.lcov. In this case, the ~ is read as part of a literal filename due to the -f check quoting the file path, causing the orb to fail to upload the coverage file even though it doesn't exist.

I think a fix would be to do something like COVERALLS_COVERAGE_FILE="$(readlink -f "$COVERALLS_COVERAGE_FILE")" after checking if the variable is empty but before the existence checks. I'll file a PR with this change.

"Upload Coverage Result To Coveralls" sometimes fails even when `fail_on_error: false` is set

I've had a bunch of build failures since starting to use the Coveralls orb. This is undesirable because it can block people from merging their changes for what we consider to be a non-essential part of the process. I thought that setting fail_on_error: false would prevent this, but it seems not to have.

Here's one of the errors I've encountered:

sha256sum: coveralls-linux.tar.gz: No such file or directory
coveralls-linux.tar.gz: FAILED open or read
sha256sum: WARNING: 1 listed file could not be read
tar (child): coveralls-linux.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Parsing args
Dry run - 0
Reporting coverage
+ ./coveralls report --no-fail
/bin/bash: line 74: ./coveralls: No such file or directory

Exited with code exit status 127

It appears to be failing on this line:

./coveralls report $args

I think this could be solved by adding || true to the end of the command if fail_on_error is false.

I'm using coveralls/[email protected].

Add option not to rely on sudo if $EUID is not 0

Hello,

I progress with coveralls integration. I encounter an issue as, to install npm, I rely on :

https://circleci.com/developer/orbs/orb/circleci/node#usage-install_nodejs

However, I then get:

sudo: npm: command not found

Given

https://stackoverflow.com/questions/31472755/sudo-npm-command-not-found

I understand npm should have been installed in a place available to sudo, but this node/npm does not do it this way.

However, Coveralls orb prefer prefixing npm with sudo when not executed as root, which seem to be the cause of my issue.

Is it possible to add an option not to rely on sudo even if $EUID is not 0?

Different build number when re-running failed steps

I have a CircleCI setup with parallel build steps. Each step runs a part of the test suite and generates a coverage report.

Sometimes one of the steps fails unexpectedly and I just re-run them. But CircleCI assigns a different CIRCLE_WORKFLOW_ID on each re-run step, which means coverage gets uploaded to a new build on Coveralls.

Any suggestions how to overcome this? I would expect the coverage to be uploaded to the same build number when just re-running a failed build.

Does this Orb require any changes to work with DockerHub auth?

Describe Request:

When DockerHub starts rate limiting anonymous requests on Nov 1st, it looks like this Orb will be impacted, since there's no auth key in the docker config. It looks like a standard pattern is to expect DOCKERHUB_USERNAME/DOCKERHUB_PASSWORD environment variables (see example), will this (or something equivalent) be required for this Orb?

Examples:

https://discuss.circleci.com/t/updated-authenticate-with-docker-to-avoid-impact-of-nov-1st-rate-limits/37567/35

Option to not fail build if Coveralls upload fails

It's the second time in a short period of time that coveralls uploads fail due to their infrastructure issues. Builds should be allowed to pass despite this non critical failure.

Provide an option to not throw a critical error allowing builds to pass despite upload failures.

Search for all lcov.info in given folder

It seems the orb takes as path_to_lcov parameter a single file path. Would it be relevant/possible to search for any lcov.info files in given folder, if path_to_lcov is a folder?

Add option to provide a source filepath for mono repos

We have a mono repo with multiple packages working together. The tree looks similar to this

project root
-> packages
  -> package1
  -> package2
  -> package3

Each package has it's own test runs and own coverage files.
When I run cat packages/package1/coverage/lcov.info | coveralls, like the orb does, it can find the lcov informations, but the result is empty. The coverage file contains paths like src/views/App.js, without the package path. So this condition results in false because there is no src/views/App.js in the root directory.
node-coveralls has an option to provide an aditional filepath, see it here: https://github.com/nickmerwin/node-coveralls/blob/master/lib/getOptions.js#L246-L250
But I can not configure the Orb to utilize this option which means I have to manually install and use node-coveralls for my circleci builds like this:

      - run:
          name: Upload coverage reports to Coveralls
          shell: /bin/bash
          command: |
            npx coveralls packages/package1/ < packages/package1/coverage/lcov.info && \
            npx coveralls packages/package2/ < packages/package2/coverage/lcov.info && \
            npx coveralls packages/package3/ < packages/package3/coverage/lcov.info

A filepath option for source files is missing in the orb configuration. Without we are not able to use the orb, which I really would like to do.

Syntax error?

When i try to use this orb i get the following error:

#!powershell.exe -ExecutionPolicy Bypass
if false; then
  curl "https://coveralls.io/webhook?repo_token=COVERALLS_REPO_TOKEN" \
    -d "payload[build_num]=$CIRCLE_BUILD_NUM&payload[status]=done"
  exit 0
fi

sudo npm install -g coveralls

if [ ! $COVERALLS_REPO_TOKEN ]; then
  export COVERALLS_REPO_TOKEN=COVERALLS_REPO_TOKEN
fi

export COVERALLS_ENDPOINT=https://coveralls.io

export COVERALLS_FLAG_NAME=""

if false; then
  export COVERALLS_PARALLEL=true
fi

# check for lcov file presence:
if [ ! -r ./coverage/lcov.info ]; then
  echo "Please specify a valid 'path_to_lcov' parameter."
  exit 1
fi

cat ./coverage/lcov.info | coveralls --verbose
At line:1 char:3
+ if false; then
+   ~
Missing '(' after 'if' in if statement.
At line:9 char:3
+ if [ ! $COVERALLS_REPO_TOKEN ]; then
+   ~
Missing '(' after 'if' in if statement.
At line:9 char:5
+ if [ ! $COVERALLS_REPO_TOKEN ]; then
+     ~
Missing type name after '['.
At line:17 char:3
+ if false; then
+   ~
Missing '(' after 'if' in if statement.
At line:22 char:3
+ if [ ! -r ./coverage/lcov.info ]; then
+   ~
Missing '(' after 'if' in if statement.
At line:22 char:5
+ if [ ! -r ./coverage/lcov.info ]; then
+     ~
Missing type name after '['.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
 

Exited with code exit status 1
CircleCI received exit code 1

i have defined a environment variable named COVERALLS_REPO_TOKEN.

My configuration:

jobs:
  build:
    executor: win/default     
   
    steps:
      - checkout
      - run: dotnet build
      - run: dotnet test --no-build --logger "trx" --collect:"XPlat Code Coverage" --settings coverlet.runsettings
      - run:
          name: test results
          when: always
          command: |
              dotnet tool install -g trx2junit
              export PATH="$PATH;/root/.dotnet/tools"
              trx2junit CompressedStaticFiles.Tests/TestResults/*.trx
      - store_test_results:
          path: CompressedStaticFiles.Tests/TestResults
      - store_artifacts:
          path: CompressedStaticFiles.Tests/TestResults
          destination: TestResults
      - coveralls/upload

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.