首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CircleCI上传到CodeCov无法找到覆盖报告?

CircleCI上传到CodeCov无法找到覆盖报告?
EN

Stack Overflow用户
提问于 2022-01-13 13:49:55
回答 1查看 339关注 0票数 2

由于TravisCI.org不再为小型开源项目提供免费服务,我正在尝试设置CircleCI和CodeCov。

在CircleCI中创建覆盖报告似乎是可行的:

但是,上传到CodeCov失败,无法找到克拉姆报告:

我遵守了https://circleci.com/docs/2.0/code-coverage/#codecov的指示

codecov/codecov@1.0.2

  • Allowed

  • 使用了orb非私有orb

  • ,使用CircleCI 2.1

  • Generating phpdbg

  • ,我尝试了store_artificats,没有,我不清楚这是否与codecov一起使用,但都失败了

那是我的config.yml:

代码语言:javascript
复制
# PHP CircleCI 2.0 configuration file
# See: https://circleci.com/docs/2.0/language-php/
version: 2.1

orbs:
  codecov: codecov/codecov@1.0.2

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
  build:
    # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
    # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
    docker:
      # Specify the version you desire here
      - image: circleci/php:7.2-node-browsers

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # Using the RAM variation mitigates I/O contention
      # for database intensive operations.
      # - image: circleci/mysql:5.7-ram
      #
      # - image: redis:2.8.19

    # Add steps to the job
    # See: https://circleci.com/docs/2.0/configuration-reference/#steps
    steps:
      - checkout

      - run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev
      - run: sudo docker-php-ext-install zip

      # Download and cache dependencies
      - restore_cache:
          keys:
            # "composer.lock" can be used if it is committed to the repo
            - v1-dependencies-{{ checksum "composer.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-

      - run: composer install -n --prefer-dist

      - save_cache:
          key: v1-dependencies-{{ checksum "composer.json" }}
          paths:
            - ./vendor

      # run tests with phpunit or codecept
      #- run: ./vendor/bin/phpunit

      - run:
          name: "Run tests"
          command: phpdbg -qrr vendor/bin/phpunit --coverage-html build/coverage-report
      - codecov/upload:
          file: build/coverage-report

下面是失败的构建:

https://app.circleci.com/pipelines/github/iwasherefirst2/laravel-multimail/25/workflows/57e6a71c-7614-4a4e-a7cc-53f015b3d437/jobs/35

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-13 14:24:51

Codecov无法处理HTML覆盖率报告。您也应该要求phpunit通过更改或附加命令来读取--coverage-clover coverage.xml来输出XML。

您可以在https://docs.codecov.com/docs/supported-report-formats上查看受支持和不受支持的覆盖率格式的列表。

1保存的https://web.archive.org/web/20220113142241/https://docs.codecov.com/docs/supported-report-formats

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70697709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档