Coder Social home page Coder Social logo

check-code-coverage's Issues

check-against-readme always looks for the project-level README

The token is definitely being passed in, but for whatever reason isn't being found.

 Ensure coverage has not dropped ๐Ÿ“ˆ4s
    GITHUB_TOKEN: ***
Run DEBUG=check-code-coverage npx set-gh-status --check-against-readme
  DEBUG=check-code-coverage npx set-gh-status --check-against-readme
  shell: /bin/bash -e {0}
  env:
    GITHUB_TOKEN: ***
npx: installed 69 in 3.549s
Token must be provided!
##[error]Process completed with exit code 1.

It looks like this package assumes everything is at the root folder. After adding cd clients/html && to the npx line, it works, but then it's looking for the badge at the root-level README which doesn't have a badge.

update-badge adds new badge even when one is present

Current README:

![check-code-coverage](https://img.shields.io/badge/code--coverage-92.9%25-brightgreen)
![Master](https://github.com/dchbx/enroll-ui/workflows/Test,%20Lint,%20Build/badge.svg?branch=master)

Run DEBUG=check-code-coverage npx update-badge --from /Users/markgoho/Projects/enroll-ui/apps/admin-e2e/coverage/coverage-summary.json

check-code-coverage args: { _: [], '--from': '/Users/markgoho/Projects/enroll-ui/apps/admin-e2e/coverage/coverage-summary.json' } +0ms
  check-code-coverage reading coverage from { filename: '/Users/markgoho/Projects/enroll-ui/apps/admin-e2e/coverage/coverage-summary.json' } +0ms
  check-code-coverage reading coverage summary from: /Users/markgoho/Projects/enroll-ui/apps/admin-e2e/coverage/coverage-summary.json +0ms
  check-code-coverage clamped coverage: 92.9 +3ms
  check-code-coverage coverage regex: "/https:\/\/img\.shields\.io\/badge\/code--coverage-\d+%25-(:?red|yellow|green|brightgreen)/" +1ms
  check-code-coverage for coverage 92.9% badge color "brightgreen" +1ms
  check-code-coverage new coverage badge: "https://img.shields.io/badge/code--coverage-92.9%25-brightgreen" +0ms
โš ๏ธ Could not find code coverage badge in file /Users/markgoho/Projects/enroll-ui/README.md
Insert new badge on the first line
  check-code-coverage inserting new badge: ![check-code-coverage](https://img.shields.io/badge/code--coverage-92.9%25-brightgreen) +0ms
saving updated readme with coverage 92.9%

Updated README:

![check-code-coverage](https://img.shields.io/badge/code--coverage-92.9%25-brightgreen) ![check-code-coverage](https://img.shields.io/badge/code--coverage-92.9%25-brightgreen)
![Master](https://github.com/dchbx/enroll-ui/workflows/Test,%20Lint,%20Build/badge.svg?branch=master)

P.S. โค๏ธ the debugging, it helps so much!

--from flag not working

Marks-MacBook-Pro:enroll-ui markgoho$ DEBUG=check-code-coverage npx update-badge --from apps/admin-e2e/coverage/coverage-summary.json
  check-code-coverage args: { _: [], '--from': 'apps/admin-e2e/coverage/coverage-summary.json' } +0ms
  check-code-coverage reading coverage from { filename: 'apps/admin-e2e/coverage/coverage-summary.json' } +0ms
  check-code-coverage reading coverage summary from: apps/admin-e2e/coverage/coverage-summary.json +1ms
Cannot find module 'apps/admin-e2e/coverage/coverage-summary.json'
Require stack:
- /Users/markgoho/Projects/enroll-ui/node_modules/check-code-coverage/src/index.js
- /Users/markgoho/Projects/enroll-ui/node_modules/check-code-coverage/bin/update-badge.js

Project folders:
image

Is npx doing something weird?

fail a CI job based on the threshold check

We are looking for a hacky way to fail a CI job based bash output.

โœ… Total statement coverage 95.68% is >= minimum 95%

If we do not see a โœ…, fail the job. Is this possible?

Extend check-total to look beyond statements and read from Nyc config like .nycrc

Extend check-total to look beyond statements. It appears, at the moment, check-total only checks against statements and not against lines, functions or branches.

check-total --from coverage/coverage-summary.json --min 80

Expected

Also support

check-total --from coverage/coverage-summary.json --min 80 --functions 63 --branches 53

Which would check against lines, functions and branches as well.

Additionally, if .nycrc is present then it can read the thresholds if not provided on cli.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency debug to v4.3.5
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update dependency ava to v6
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency semantic-release to v20
  • chore(deps): update dependency semantic-release to v21
  • chore(deps): update dependency semantic-release to v22
  • chore(deps): update dependency semantic-release to v23
  • chore(deps): update dependency semantic-release to v24
  • fix(deps): update dependency arg to v5
  • fix(deps): update dependency got to v12
  • fix(deps): update dependency got to v13
  • fix(deps): update dependency got to v14
  • chore(deps): lock file maintenance
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • bahmutov/npm-install v1
  • cycjimmy/semantic-release-action v3
npm
package.json
  • arg 4.1.3
  • debug 4.3.4
  • got 11.8.6
  • lodash 4.17.21
  • ava 3.15.0
  • prettier 2.8.8
  • semantic-release 18.0.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.