Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js “获得保险”;“未知”;戴徽章_Node.js_Unit Testing_Gitlab_Code Coverage_Test Coverage - Fatal编程技术网

Node.js “获得保险”;“未知”;戴徽章

Node.js “获得保险”;“未知”;戴徽章,node.js,unit-testing,gitlab,code-coverage,test-coverage,Node.js,Unit Testing,Gitlab,Code Coverage,Test Coverage,一直试图在代码覆盖率徽章中显示覆盖率。我在CI/CD上得到报道 -->JOBS部分,但在gitlab徽章中没有更新覆盖率。下面是我的gitlab-ci.yml文件,我在其中查找覆盖率并将其保存在工件中 variables: DOCKER_DRIVER: overlay2 GIT_CLEAN_FLAGS: -ffdx -e node_modules/ GIT_DEPTH: 10 stages: - test test: image: docker:19.03.12 s

一直试图在代码覆盖率徽章中显示覆盖率。我在CI/CD上得到报道 -->JOBS部分,但在gitlab徽章中没有更新覆盖率。下面是我的gitlab-ci.yml文件,我在其中查找覆盖率并将其保存在工件中


variables:
  DOCKER_DRIVER: overlay2
  GIT_CLEAN_FLAGS: -ffdx -e node_modules/
  GIT_DEPTH: 10

stages:
  - test

test:
  image: docker:19.03.12
  services:
    - docker:dind
  stage: test
  script:
    - c8 --all  --reporter=text-summary npm run test 
  artifacts:
    when: always
    paths:
      - coverage
配置- 测试覆盖率分析-“语句\s+:\s(\d+。?\d+)”


徽章
下的链接配置中,您已经放置了徽章URL,而您需要指向您的分支,例如…
http://gitlab.cpm/abcProject/commits/pipeline-test
@G.Pillai已尝试,仍获取未知覆盖率对覆盖率结果的解析可能已失败。解释如何检查覆盖率输出是否与正则表达式匹配。覆盖率结果应显示在管道执行报告中。@mpromonet覆盖率显示在管道执行报告中,但不知何故没有添加到覆盖率中。您是否尝试直接使用访问svg?或者可能?取决于您的分行名称。