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

chore: upgrade to ruby 3 #392

Merged
merged 2 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/docker-compose-ci.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/elasticsearch.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/run_tests.sh

This file was deleted.

56 changes: 48 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,57 @@ on:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
ruby-version: ['2.5.7', '3.0.4']
mongodb-version: ['4.2.14']
include:
- ruby-version: 2.5.7
gemfile: Gemfile
allow-failure: false
- ruby-version: 3.0.4
gemfile: Gemfile3
allow-failure: false
env:
SEARCH_SERVER_ES7: http://localhost:9200
MONGOHQ_URL: mongodb://localhost:27017/cs_comments_service_test
MONGOID_AUTH_MECH: ""
NEW_RELIC_ENABLE: false
RACK_ENV: staging
SINATRA_ENV: staging
API_KEY: password
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
RACK_TIMEOUT_SERVICE_TIMEOUT: 20
services:
elasticsearch:
image: elasticsearch:7.8.0
env:
discovery.type: single-node
bootstrap.memory_lock: true
ES_JAVA_OPTS: -Xms512m -Xmx512m
network.host: 0.0.0.0
cluster.routing.allocation.disk.watermark.low: 150mb
cluster.routing.allocation.disk.watermark.high: 100mb
cluster.routing.allocation.disk.watermark.flood_stage: 50mb
ports:
- 9200:9200
mongodb:
image: mongo:${{ matrix.mongodb-version }}
ports:
- 27017:27017
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Ruby
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Build the stack
run: docker-compose -f ./.github/docker-compose-ci.yml build test-forum
- name: Install dependencies
run: bundle install

- name: Test
run: docker-compose -f ./.github/docker-compose-ci.yml run --rm test-forum
- name: Run tests
run: bin/rspec -fd
continue-on-error: ${{ matrix.allow-failure }}
24 changes: 6 additions & 18 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ gem 'pry-nav'

gem 'bundler'

gem 'rake', '~> 12.3.3'
gem 'rake'

gem 'sinatra'
gem 'sinatra-param', '~> 1.4'

gem 'yajl-ruby', '~> 1.3.1'

gem 'activemodel', '~> 6.0.3.1'
gem 'activemodel'
gem 'protected_attributes_continued'

gem 'mongoid'
Expand Down Expand Up @@ -45,30 +45,18 @@ gem 'dalli'

gem 'rest-client'

gem 'rubyzip', '~> 1.2.2'

gem 'ffi', '~> 1.9.24'

gem 'faye-websocket', '~> 0.11.0'

gem 'addressable', '~> 2.8.0'

gem 'activesupport', '~> 6.0.3.1'

gem 'rack-protection', '~> 1.5.5'

group :test do
gem 'codecov', :require => false
gem 'mongoid_cleaner', '~> 1.2.0'
gem 'factory_girl', '~> 4.0'
gem 'faker', '~> 1.6'
gem 'factory_bot'
gem 'faker'
gem 'guard'
gem 'guard-unicorn'
gem 'rack-test', :require => 'rack/test'
gem 'rspec', '~> 3.6.0'
gem 'rspec'
gem 'rspec-its'
gem 'rspec-collection_matchers'
gem 'webmock', '~> 3.0.1'
gem 'webmock'
end

group 'newrelic_rpm' do
Expand Down
Loading