Skip to content
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

nil can't be coerced into Fixnum error while running tests on circle ci in minitest/ci_plugin.rb:113 #22

Open
pahnin opened this issue Dec 7, 2017 · 1 comment

Comments

@pahnin
Copy link

pahnin commented Dec 7, 2017

[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
@everaldo
Copy link

everaldo commented Jan 9, 2018

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants