Git Product home page Git Product logo

jest-lcov-reporter's People

Contributors

alexjfno1 avatar dependabot[bot] avatar mutoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jest-lcov-reporter's Issues

Error: Cannot read property 'head' of undefined

Hello,

I get the following jest-lcov-reporter error in GitHub Actions:

Run vebr/[email protected]
TypeError: Cannot read property 'head' of undefined
    at main$1 (/Users/runner/work/_actions/vebr/jest-lcov-reporter/v0.2.0/dist/main.js:22940:41)
Error: Cannot read property 'head' of undefined

The error did not occur on the branch PR job, but it did occur consistently on the PR merge job to develop.

Support of GitHub Enterprise

I found this action and it looked pretty cool, so I tried to run it on a GitHub Enterprise instance, but it failed because it tried to send the report to api.github.com/... instead of the URL which should be in GITHUB_API_URL - according to https://docs.github.com/en/actions/reference/environment-variables

Run vebr/[email protected]
RequestError [HttpError]: Bad credentials
    at /home/runner/_work/_actions/vebr/jest-lcov-reporter/v0.2.0/dist/main.js:6018:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async main$1 (/home/runner/_work/_actions/vebr/jest-lcov-reporter/v0.2.0/dist/main.js:22950:2) {
  name: 'HttpError',
  status: 401,
  headers: {
    'access-control-allow-origin': '*',
    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
    connection: 'close',
    'content-length': '80',
    'content-security-policy': "default-src 'none'",
    'content-type': 'application/json; charset=utf-8',
    date: 'Tue, 02 Feb 2021 10:55:51 GMT',
    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
    server: 'GitHub.com',
    status: '401 Unauthorized',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    vary: 'Accept-Encoding, Accept, X-Requested-With',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'deny',
    'x-github-media-type': 'github.v3; format=json',
    'x-github-request-id': 'DB6E:35E5:47937F:C53B69:60192FB7',
    'x-ratelimit-limit': '60',
    'x-ratelimit-remaining': '59',
    'x-ratelimit-reset': '1612266951',
    'x-ratelimit-used': '1',
    'x-xss-protection': '1; mode=block'
  },
  request: {
    method: 'POST',
    url: 'api.github.com/repos/telltale/frontend/issues/589/comments',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit.js/16.35.0 Node.js/12.13.1 (Linux 4.19; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: `{"body":"Coverage after merging <b>speed-up-jest-tests</b> into <b>develop</b><table> [TABLE CoNTENT OMMITED for opening THIS GITHUB ISSUE]</table></details>"}`,
    request: { hook: [Function: bound bound register], validate: [Object] }
  },
  documentation_url: 'docs.github.com/rest'
}
Error: Bad credentials

update-comment true not working

- name: report coverage based on jest
        uses: vebr/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          update-comment: true

I've changed update-comment a while ago from false into true and the comments even from new PR's are still not updated.

Perhaps this is the same (but opposite) issue as #21

How to create a lcov base

In the readme:

lcov-base (Optional)
The location of the lcov file resulting from running the tests in the base branch. When this is set a diff of the coverage percentages is shown.

How to create this lcov base from the master/main branch? I could create it myself every time and commit it, but i don't think that's a good idee?

Should there be an actions that runs the test every time on the master and store this somehow?
Or should this action also run tests on another branch? is that possible?

`update-comment` updates the same comment in reusable workflows

I'm trying to use this in a monorepo, where we have a reusable workflow that does the whole checkout/npm ci/npm run <command> etc. shenanigans.

Unfortunately, the update-comment option doesn't seem to play well with reusable workflows. Looking at the code, it's looking for a comment containing <!-- Code Coverage Comment: <workflow name> -->. I feel like it should probably use the optional name input if provided rather than the workflow name, as this means different test suites end up overwriting each other.

Comment is updated even with option in false

I have a workflow with two different jobs which each of them has this GA action.

 - name: Publish code coverage report
    uses: vebr/[email protected]
     with:
        github-token: ${{ github.token }}
        name: Client Portal Coverage Report
        lcov-file: webapps/client-portal/coverage/lcov.info
        update-comment: false
- name: Publish code coverage report
    uses: vebr/[email protected]
    with:
       github-token: ${{ github.token }}
       name: Qualifications Portal Coverage Report
        lcov-file: webapps/qualifications-portal/coverage/lcov.info
        update-comment: false

The issue is always there is only one comment created and it's being updated, so I never have the two comments.

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.