Use .ruby-version
to Set up Ruby 💎
#366
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: .ruby-version | |
- name: Build and test with Rake, RSpec, RuboCop, Fasterer | |
run: | | |
gem install bundler -v 2.0.2 | |
bundle install --jobs 4 --retry 3 | |
bundle exec rake | |
bundle exec rubocop | |
bundle exec fasterer | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 |