Skip to content

Commit

Permalink
Merge pull request #5 from aktsk/run-test-with-github-actions
Browse files Browse the repository at this point in the history
Run test with github actions and remove Circleci
  • Loading branch information
yasuno0327 authored Apr 18, 2023
2 parents 0e48103 + b6bafd8 commit 45778ee
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 52 deletions.
48 changes: 0 additions & 48 deletions .circleci/config.yml

This file was deleted.

File renamed without changes.
38 changes: 38 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions spec/octoball/scope_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 45778ee

Please sign in to comment.