minitest-ci
minitest-ci copied to clipboard
nil can't be coerced into Fixnum error while running tests on circle ci in minitest/ci_plugin.rb:113
[Minitest::CI] Generating test report in JUnit XML format...
/home/circleci/circleci-demo-ruby-rails/vendor/bundle/ruby/2.2.0/gems/minitest-ci-3.3.0/lib/minitest/ci_plugin.rb:113:in `+': nil can't be coerced into Fixnum (TypeError)
This is the error we are seeing We are upgrading our app from rails 3 to rails 4.2 with new ruby and also from old config to circleci 2.0
Following is the circleci config, if it helps
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.2.8-browsers
- image: mysql:5.7.20
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_ROOT_HOST=%
- image: redis:3.2.4
- image: docker.elastic.co/elasticsearch/elasticsearch:5.6.2
environment:
- discovery.type=single-node
- http.host=0.0.0.0
- transport.host=127.0.0.1
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms750m -Xmx750m
parallelism: 1
working_directory: ~/circleci-demo-ruby-rails
steps:
- checkout
- run:
name: git
command: git --version
- run:
name: firefox
command: firefox -version
- run:
name: ruby version
command: ruby --version
- run:
name: install mysql client
command: sudo apt-get update && sudo apt-get install -y mysql-client
- run: cp config/database.ci.yml config/database.yml
# Restore bundle cache
- restore_cache:
key: circlev2-{{ checksum "Gemfile.lock" }}
- run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
# Store bundle cache
- save_cache:
key: circlev2-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run: mkdir ~/reports
- run: RAILS_ENV=test bundle exec rake db:create
- run: RAILS_ENV=test bundle exec rake db:structure:load
- run:
name: rails tests
command: "RAILS_ENV=test bundle exec rake test TESTOPTS='--ci-dir=./reports'"
no_output_timeout: 1800
- store_test_results:
path: ~/reports
@pahnin , I had to downgrade Minitest to 5.1.0 and apply some patches. Most of it I've copied from #25
https://github.com/everaldo/minitest-ci/commits/master