name: Ruby

on:
  workflow_dispatch
  pull_request:
    paths-ignore:
      - 'docs/**'
      - '**.md'

jobs:
  test:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        bundler-cache: true
    - name: Install dependencies
      run: bundle install
    - name: Run tests
      run: bundle exec rake

Add a GitHub Action for CI
Add a GitHub Action for CI

This GitHub Action [runs] when a pull request is opened, re-opened, or
[synchronized], [ignoring] any PR that only touches docs. It also can be
run [manually].

It uses the [setup-ruby] action provided by Ruby, tracking releases. The
only interesting bit here is that it [caches] bundler artifacts.

[caches]: https://github.com/ruby/setup-ruby/blob/master/README.md#caching-bundle-install-automatically
[setup-ruby]: https://github.com/ruby/setup-ruby
[ignoring]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths
[manually]: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
[runs]: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request
[synchronized]: https://github.community/t/what-is-a-pull-request-synchronize-event/14784/2
