Skip to content

Enable tests via GitHub Actions #2

Enable tests via GitHub Actions

Enable tests via GitHub Actions #2

Workflow file for this run

name: Unit tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.3']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Prepare test database
run: bundle exec rake db:setup
- name: Run tests
run: bundle exec rspec