.github/workflows/main.yml
name: build
on:
push:
branches: [ main ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [2.6, 2.7, 3.0, 3.1, jruby-9.3.6.0]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rspec
lint:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [3.1]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run rubocop
run: bundle exec rubocop
- name: Run fasterer
run: bundle exec fasterer
- name: Run bundle audit
run: bundle exec bundle audit check --update