-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test reporter broke #418
Comments
This seems to be related to the new simplecov 0.18 release. |
Same issue for me - crops up with a PR to upgrade SimpleCov to 0.18. |
oops, duplicate of #413 probably |
yes, it's the 0.18 release that's causing it with the changes in the file. |
This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```console $ #!/bin/bash -eo pipefail ./tmp/cc-test-reporter before-build COVERAGE=true bundle exec rake spec ./tmp/cc-test-reporter format-coverage --output tmp/codeclimate.$CIRCLE_JOB.json Starting test-queue master (/tmp/test_queue_228_47138309905180.sock) ==> Summary (2 workers in 36.1115s) [ 1] 8753 examples, 0 failures, 9 pending 254 suites in 36.1034s (pid 160 exit 0 ) [ 2] 6772 examples, 0 failures, 2 pending 239 suites in 36.1054s (pid 161 exit 0 ) Coverage report generated for RSpec, rspec-1, rspec-2, rspec-fork-163, rspec-fork-164, rspec-fork-165 to /home/circleci/project/coverage. 21266 / 21459 LOC (99.1%) covered. Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter format-coverage [coverage file] [flags] Flags: --add-prefix string add this prefix to file paths -t, --input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] -o, --output string output path (default "coverage/codeclimate.json") -p, --prefix string the root directory where the coverage analysis was performed (default "/home/circleci/project") Global Flags: -d, --debug run in debug mode Exited with code exit status 255 ``` https://circleci.com/gh/rubocop-hq/rubocop/83619 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved.
* Temp. fix for cc-test-reporter & SimpleCov 0.18 codeclimate/test-reporter#418 On 28 Jan 2020 [SimpleCov 0.18.0](https://github.com/colszowka/simplecov/releases/tag/v0.18.0) was released. Though it's generating code coverage for us, its changed the JSON format of the `/coverage/.resultset.json` CodeClimate's [cc-test-reporter](https://github.com/codeclimate/test-reporter) appears to rely on. <details> <summary>Format before</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": [ null, null, 1 ] }, "timestamp": 1580226312 } } ``` </details> <details> <summary>Format after</summary> ```json { "RSpec": { "coverage": { "/path/to/my/file.rb": { "lines": [ null, null, 1, null ], "branches": { } } }, "timestamp": 1580299988 } } ``` </details> When **cc-test-reporter** is called in the `after_script` hook in Travis-CI we are seeing the following error ```bash if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] Flags: -s, --batch-size int batch size for source files (default 500) -e, --coverage-endpoint string endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports") -t, --coverage-input-type string type of input source to use [clover, cobertura, coverage.py, excoveralls, gcov, gocov, jacoco, lcov, simplecov, xccov] --exit-code int exit code of the test run -r, --id string reporter identifier (default "463a251defaae85271bff85ea8b1e58aa06cc9322157aa3ad7ee2a986aa13612") --insecure send coverage insecurely (without HTTPS) -p, --prefix string the root directory where the coverage analysis was performed (default "/home/travis/build/DEFRA/waste-carriers-front-office") Global Flags: -d, --debug run in debug mode ``` As the CodeClimate integration is important to our CI process, we have chosen to temporarily set the version of SimpleCov as 0.17.1 until the issue is resolved. * WAKEUP CODECLIMATE
CodeClimateが対応していないため。 codeclimate/test-reporter#418
CodeClimateが対応していないため。 codeclimate/test-reporter#418
Closes faker-ruby#2043. This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```console Run export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] (snip) Global Flags: -d, --debug run in debug mode ##[error]Process completed with exit code 255. ``` https://github.com/faker-ruby/faker/pull/2043/checks?check_run_id=750522010 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
Closes faker-ruby#2241. This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```console Run export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt Usage: cc-test-reporter after-build [flags] (snip) Global Flags: -d, --debug run in debug mode ##[error]Process completed with exit code 255. ``` https://github.com/faker-ruby/faker/pull/2043/checks?check_run_id=750522010 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
I am using the latest version of cc-test-reporter and Simplecov 0.21.2 and still experiencing the issue. Anyone else experiencing this? |
Same for me. The Simplecov (0.21.2) + Rspec doesn't seem to work with codeclimate test reporter. @fedegl Have you found a workaround for that? |
Still an issue for me(simplecov-0.21.2) |
commit c922580 Author: Artem Kozaev <[email protected]> Date: Tue Dec 8 22:58:00 2020 +0300 Add email validation errors via add (lynndylanhurley#1445) commit 72ccd90 Author: Hu Hailin <[email protected]> Date: Wed Dec 9 04:57:39 2020 +0900 rc causes issue for namespaced class, use mapping directly to keep behavior consistency with devise (lynndylanhurley#1440) commit 8dba30b Author: Maicol Bentancor <[email protected]> Date: Tue Dec 8 16:57:19 2020 -0300 Enable rails 6.1 (lynndylanhurley#1446) commit 575272a Author: Ali Deishidi <[email protected]> Date: Fri Dec 4 19:20:56 2020 +0330 Update faq.md (lynndylanhurley#1439) Type was missing commit 2a83ef9 Author: dominikdarnel <[email protected]> Date: Sun Nov 8 21:51:36 2020 +0100 Update overrides.md (lynndylanhurley#1437) Overrideable methods RegistrationsController#render_destroy_success and RegistrationsController#render_destroy_error were missing from docs. commit 5ef7197 Author: Avrohom Katz <[email protected]> Date: Sun Nov 1 10:40:30 2020 -0500 make DTA respect controller overrides it doesn't kow about (lynndylanhurley#1435) commit 24da31e Author: Paulo Ribeiro <[email protected]> Date: Sun Nov 1 12:39:35 2020 -0300 feat(Route): Accept override (lynndylanhurley#1432) commit 530b4ba Author: JP Rosevear <[email protected]> Date: Mon Oct 19 17:32:04 2020 -0400 Remove unnecessary require_relative the file should be autoloaded (lynndylanhurley#1433) commit 576d0b0 Author: Martin Jaime <[email protected]> Date: Mon Oct 19 18:31:44 2020 -0300 Enhancement: remove unnecessary statement in destroy session (lynndylanhurley#1431) commit 0c369d6 Author: Maicol Bentancor <[email protected]> Date: Sun Oct 4 17:34:44 2020 -0300 Serialize updated at without to s (lynndylanhurley#1423) * working 4.2 version * cleanup * Lock simplecov to last supported cc version codeclimate/test-reporter#413 Co-authored-by: Brian Dunn <[email protected]> commit bb3e3f0 Author: Brent Dearth <[email protected]> Date: Tue Sep 1 11:05:33 2020 -0600 chore(deps): remove Sprockets requirement (lynndylanhurley#1428) commit bef1b0b Author: ngouy <[email protected]> Date: Sat Jul 25 14:43:00 2020 -0400 missing space in migration generator (lynndylanhurley#1422) So everything is nicely aligned if you uncomment this commit b409997 Author: Maicol Bentancor <[email protected]> Date: Sun Jun 21 21:53:29 2020 -0300 Avoid failing on undefined variable for invalid record (lynndylanhurley#1416) commit 30a1aff Author: Maicol Bentancor <[email protected]> Date: Sun Jun 21 21:52:43 2020 -0300 Avoid nullyfing token when current_user is called before (lynndylanhurley#1417) commit ae3547c Author: Charlie Hua <[email protected]> Date: Sun Jun 21 04:37:15 2020 +0800 Memorize current_#{group_name} to avoid error (lynndylanhurley#722) Currently current_#{group_name} (ex. current_member) is not memorized as current_#{mapping} (ex. current_user) is. Instead, it calls set_user_by_token every time, and this could cause error if current_member is called after token is changed (maybe by some other request) and return nil commit 849c244 Author: Maicol Bentancor <[email protected]> Date: Sat Jun 20 00:39:42 2020 -0300 Fix parent class name generator for rails 6 (lynndylanhurley#1414) commit 449a0be Author: Maicol Bentancor <[email protected]> Date: Fri Jun 19 20:09:26 2020 -0300 Reduce config variables doc table width (lynndylanhurley#1413) commit 4461a09 Author: Hai Phan Nguyen <[email protected]> Date: Sat Jun 20 05:27:45 2020 +0700 Fix crash on devise 4.7.2+ (lynndylanhurley#1412) * Ignore sync uid in case confirmable mail changed * Update user_omniauth_callbacks.rb * Update user_omniauth_callbacks.rb * fix crash on devise 4.7.2+ commit bb09616 Author: Hai Phan Nguyen <[email protected]> Date: Wed Jun 10 20:56:28 2020 +0700 Ignore sync uid in case confirmable mail changed (lynndylanhurley#1407) * Ignore sync uid in case confirmable mail changed * Update user_omniauth_callbacks.rb * Update user_omniauth_callbacks.rb commit b3d53b6 Author: Maicol Bentancor <[email protected]> Date: Tue Jun 2 15:07:22 2020 -0300 Bump version to 1.1.4 (lynndylanhurley#1406) commit 2a01f4f Author: Jamal Mohammed <[email protected]> Date: Tue Jun 2 22:07:49 2020 +0530 Update faq.md (lynndylanhurley#1401) Updated FAQ to add **allow_password_change** column if not already added in existing User model. commit 387306a Author: Sai Chander <[email protected]> Date: Wed Apr 29 08:43:10 2020 +0800 Issue - 1358 Argument error when converting token updated_at using to_time fixed (lynndylanhurley#1388) commit a3595f4 Author: David Loukidelis <[email protected]> Date: Tue Apr 28 20:41:32 2020 -0400 Update omniauth_callbacks_controller.rb (lynndylanhurley#1398) commit ef965d7 Author: Arun Kumar Mohan <[email protected]> Date: Tue Apr 28 19:39:44 2020 -0500 Fix grammar (lynndylanhurley#1396) commit ea697f1 Author: H.Sada <[email protected]> Date: Wed Apr 29 09:39:27 2020 +0900 fixed not_email in ja.yml (lynndylanhurley#1395) commit 275da3c Author: Gabriel Bursztein <[email protected]> Date: Mon Mar 30 08:23:22 2020 -0300 Fix: Save user authentication token after email confirmation (lynndylanhurley#1391) commit 4a103ed Author: Ahmed Magdy <[email protected]> Date: Mon Mar 30 13:19:16 2020 +0200 Validate that token is valid for patch request last token (lynndylanhurley#1386) commit 4d2d702 Author: Leo Kiiski <[email protected]> Date: Mon Mar 30 14:18:54 2020 +0300 Fix token-type header key in testing example (lynndylanhurley#1390) commit ab050c2 Author: Dylan Lederle-Ensign <[email protected]> Date: Mon Mar 30 07:17:57 2020 -0400 Fix broken link (lynndylanhurley#1392) commit 8c6ea5a Author: Olle Jonsson <[email protected]> Date: Mon Mar 30 13:16:53 2020 +0200 CI build fix: Pin to pry < 0.13 for 2.3 support, workaround CodeClimate reporter issue (lynndylanhurley#1393) * gemfiles: Pin to < 0.13 for 2.3 support * Workaround: CodeClimate not supporting SimpleCov - 0.18 gives us issues - see codeclimate/test-reporter#418 commit 49e7203 Author: K-Sato <[email protected]> Date: Sat Feb 29 08:17:59 2020 +0900 Fix docs/usage/reset_password.md (lynndylanhurley#1382) commit 55fcd11 Author: Bartek Fijałkowski <[email protected]> Date: Thu Jan 30 21:35:50 2020 +0100 Add docs for confirmation endpoint (lynndylanhurley#1365) commit e0d8dfa Author: sugiken <[email protected]> Date: Fri Jan 31 05:35:31 2020 +0900 Remove Trackable option from generator (lynndylanhurley#1362) commit 8326cc7 Author: Bartek Fijałkowski <[email protected]> Date: Thu Jan 30 21:33:45 2020 +0100 Add rails 6.0 config to travis (lynndylanhurley#1366) * Add rails 6.0 config to travis * Exclude Travis Rails 6.0 checks for Ruby below 2.5 * Updates tests to be compatible with Rails 6 Rails 6 no longer generates migration with id: :uuid, so I changed the range of two ifs in tests and everything goes well now. * Add Ruby 2.7.0 to Travis * Exclude travis test for Ruby 2.7.0 with Rails 4.2 Ruby 2.7 comes with Bundler 2 which is not compatible with Rails 4 * Add to Travis test for rails 6 + mongoid 7 * Downgrade mongoid-locker for rails 6 gemfile * Allow to change primary key type for Rails 6 commit 880a249 Author: Paweł Łuczak <[email protected]> Date: Thu Jan 30 21:32:47 2020 +0100 Fix missing polish and portugese translation errors (lynndylanhurley#1377) commit 3680fd3 Author: Clément Prod'homme <[email protected]> Date: Wed Jan 29 05:42:35 2020 +0100 chore(docs): write complete path for authentication_test_spec (lynndylanhurley#1376) commit 00d7abc Author: Nicholas Martin <[email protected]> Date: Thu Jan 9 13:23:36 2020 +0000 Add case sensitive option required to prevent deprecation warning in rails 6 (lynndylanhurley#1368)
@fedegl @Mehonoshin @maurolscla 0.21.2 is working for us. However, we did get this issue before setting https://github.com/simplecov-ruby/simplecov/#json-formatter says:
Here's how to find your reporter ID: https://docs.codeclimate.com/docs/finding-your-test-coverage-token Hope it works out! |
Slight different error message that I am getting (with all the latest versions):
|
If anyone comes across this via Google, and you're using the coverageLocations: |
- ${{github.workspace}}/coverage/coverage-report-*/.resultset.json:simplecov
+ ${{github.workspace}}/coverage/coverage-report-*/coverage.json:simplecov |
This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```consle % #!/bin/bash -eo pipefail ./cc-test-reporter before-build rake coverage ./cc-test-reporter after-build --exit-code $? (snip) Coverage report generated for RSpec to /home/circleci/project/coverage. 5051 / 5064 LOC (99.74%) covered. Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt ``` https://circleci.com/gh/rubocop-hq/rubocop-rspec/10604 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```consle % #!/bin/bash -eo pipefail ./cc-test-reporter before-build rake coverage ./cc-test-reporter after-build --exit-code $? (snip) Coverage report generated for RSpec to /home/circleci/project/coverage. 5051 / 5064 LOC (99.74%) covered. Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt ``` https://circleci.com/gh/rubocop-hq/rubocop-rspec/10604 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
We have this error with simplecov 0.22
|
From: https://docs.codeclimate.com/docs/test-coverage-troubleshooting-tips#section-specific-error-messages-from-the-reporter Ensure that the References:
|
This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```consle % #!/bin/bash -eo pipefail ./cc-test-reporter before-build rake coverage ./cc-test-reporter after-build --exit-code $? (snip) Coverage report generated for RSpec to /home/circleci/project/coverage. 5051 / 5064 LOC (99.74%) covered. Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt ``` https://circleci.com/gh/rubocop-hq/rubocop-rspec/10604 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
This PR fixes the following build error when using cc-test-reporter with SimpleCov 0.18. ```consle % #!/bin/bash -eo pipefail ./cc-test-reporter before-build rake coverage ./cc-test-reporter after-build --exit-code $? (snip) Coverage report generated for RSpec to /home/circleci/project/coverage. 5051 / 5064 LOC (99.74%) covered. Error: json: cannot unmarshal object into Go struct field input.coverage of type []formatters.NullInt ``` https://circleci.com/gh/rubocop-hq/rubocop-rspec/10604 This patch is a workaround until the following issue will be resolved. codeclimate/test-reporter#418
I have no idea what changed, because I'm always pulling the latest version from the net, but since today my tests are failing because of a problem with the cc-test-reporter:
This was working fine on previous runs, but all of a sudden this is now broken on our circle-ci
The text was updated successfully, but these errors were encountered: