.github/workflows/build.yml
name: Ruby
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.6.x', '2.5.x' ]
services:
mongo:
image: mongo:3.2
ports:
- 27017:27017
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Build and test with Rake
run: |
gem install bundler
CUSTOM_RUBY_VERSION=$(ruby -e "puts RUBY_VERSION") bundle install --jobs 4 --retry 3
CUSTOM_RUBY_VERSION=$(ruby -e "puts RUBY_VERSION") bundle exec rake
env:
MONGODB_HOST: localhost
MONGO_PORT_27017_TCP_ADDR: localhost
MONGODB_PORT: 27017
CUSTOM_RUBY_VERSION: 2.6.3