diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4f4ab82..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: 2.1 - -executors: - ruby: - parameters: - version: - type: string - docker: - - image: circleci/ruby:<< parameters.version >> - - image: circleci/mysql:5 - environment: - - RAILS_ENV: test - - MYSQL_HOST: 127.0.0.1 - -jobs: - rspec: - parameters: - version: - type: string - executor: - name: ruby - version: << parameters.version >> - steps: - - checkout - - run: - name: bundle install - command: | - gem update bundler - bundle config --local path ../vendor/bundle - bundle install --gemfile .circleci/Gemfile --jobs=4 --retry=3 - bundle config --local path vendor/bundle - - run: - name: Setup databases - command: bundle exec rake db:prepare - - run: - name: Run tests - command: bundle exec rspec - -workflows: - version: 2 - rspecs: - jobs: - - rspec: - matrix: - parameters: - version: - - "2.7" - - "3.0" diff --git a/.circleci/Gemfile b/.github/Gemfile similarity index 100% rename from .circleci/Gemfile rename to .github/Gemfile diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml new file mode 100644 index 0000000..d2fce9b --- /dev/null +++ b/.github/workflows/rspec.yml @@ -0,0 +1,38 @@ +name: rspec +on: push +jobs: + rspec: + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5 + ports: + - 3306:3306 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + options: >- + --health-cmd "mysqladmin ping" + --health-interval 5s + --health-timeout 3s + strategy: + fail-fast: true + matrix: + ruby: ["2.7","3.0","3.1","3.2"] + env: + BUNDLE_GEMFILE: .github/Gemfile + MYSQL_HOST: 127.0.0.1 + RAILS_ENV: test + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Install rake + run: gem install rake + - name: Setup database + run: bundle exec rake db:prepare + - name: run rspec + run: bundle exec rspec diff --git a/spec/octoball/scope_proxy_spec.rb b/spec/octoball/scope_proxy_spec.rb index a0061b0..1120402 100644 --- a/spec/octoball/scope_proxy_spec.rb +++ b/spec/octoball/scope_proxy_spec.rb @@ -39,19 +39,19 @@ end it 'allows multiple selection by string' do - expect(@evan.select('id, name').first.id).to be_a(Fixnum) + expect(@evan.select('id, name').first.id).to be_a(Integer) end it 'allows multiple selection by array' do - expect(@evan.select(%w(id name)).first.id).to be_a(Fixnum) + expect(@evan.select(%w(id name)).first.id).to be_a(Integer) end it 'allows multiple selection by symbol' do - expect(@evan.select(:id, :name).first.id).to be_a(Fixnum) + expect(@evan.select(:id, :name).first.id).to be_a(Integer) end it 'allows multiple selection by string and symbol' do - expect(@evan.select(:id, 'name').first.id).to be_a(Fixnum) + expect(@evan.select(:id, 'name').first.id).to be_a(Integer) end end