Skip to content

Use shared, remote rubocop/standard config; set up CI for tests & linting #1

Use shared, remote rubocop/standard config; set up CI for tests & linting

Use shared, remote rubocop/standard config; set up CI for tests & linting #1

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
# This runs only on pull requests because (1) no one should be pushing anything that can break tests
# to main!; and (2) I want to be able to push documentation-only changes to main without waiting for
# tests to run
name: Run rspec, then rubocop
on:
pull_request:
branches: [ main ]
jobs:
test-and-lint:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.0']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
- name: Run rubocop
run: bundle exec rubocop