Skip to content

Remove support for ruby 3.0, update deps, fix logging using Console #591

Remove support for ruby 3.0, update deps, fix logging using Console

Remove support for ruby 3.0, update deps, fix logging using Console #591

Workflow file for this run

name: Ruby
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop -f github
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [3.1", "3.2", "3.3"]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Start Gremlin server
run: |
docker-compose up -d --build
sleep 3
- name: Install deps
run: |
gem install bundler -v 2.2.15
bundle install
- name: Run tests
run: bundle exec rspec
publish:
runs-on: ubuntu-latest
needs:
- lint
- test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Build gem
run: gem build
- name: Create credentials
run: |
mkdir ~/.gem
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.RUBYGEMS_TOKEN }}
EOF
chmod 0600 /home/runner/.gem/credentials
- name: Push gem
run: gem push *gem