Please search for similar issues before creating a ticket.
All fields below are required.
Description
I want to add a code-coverage report from CircleCI to CodeCov
CI/CD URL
Please provide a link to the CI/CD run.
Codecov Output
#!/bin/bash -eo pipefail
bash <(curl -s https://codecov.io/bash) \
-f coverage.xml \
-n ${CIRCLE_BUILD_NUM} \
-t ${CODECOV_TOKEN} \
-y .codecov.yml \
-F \
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-1.0.6
==> git version 2.20.1 found
==> curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1d zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs **** ****s telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
==> Circle CI detected.
current dir: /home/circleci/project
project root: .
Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
-> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
+ coverage.xml bytes=27489
==> Appending adjustments
https://docs.codecov.io/docs/fixing-reports
+ Found adjustments
==> Gzipping contents
4.0K /tmp/codecov.Bwy4sG.gz
==> Uploading reports
url: https://codecov.io
query: branch=master&commit=7682d45084daba6336d7686692d2a17d084ccf21&build=39&build_url=&name=39&tag=&slug=iwasherefirst2%2Flaravel-multimail&service=circleci&flags=&pr=&job=0&cmd_args=f,n,t
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-1.0.6&token=<hidden>&package=bash-1.0.6&token=-y&branch=master&commit=7682d45084daba6336d7686692d2a17d084ccf21&build=39&build_url=&name=39&tag=&slug=iwasherefirst2%2Flaravel-multimail&service=circleci&flags=&pr=&job=0&cmd_args=f,n,t
Invalid request parameters
400
Expected Results
Valid request parameters
Actual Results
Invalid request parameters
Additional Information
I followed the instructions at Generate code coverage metrics - CircleCI
- Used orb codecov/codecov@1.0.2
- Allowed unprivate orbs
- Using CircleCI 2.1
- Generating phpdbg
- I tried with store_artificats and without, unclear to me if this shall be used with codecov, but both fail
As html is not supported (Supported Coverage Report Formats) I created the .xml
file (its not mentioned at the docs, but if I would pass build/coverage-report as a file, then I would get file not found issue).
This is the my current config.yml
# 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 --coverage-clover coverage.xml
- store_artifacts:
path: build/coverage-report
- codecov/upload:
file: coverage.xml
Any idea why it fails to upload coverage report?