Skip to content

Tests

Tests #21

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- '**'
tags-ignore:
- 'v*'
schedule:
- cron: '42 0 1 * *' # on 1st day of every month at 00:42
jobs:
test:
# Skip running tests for local pull requests (use push event instead), run only for foreign ones
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
name: 'Ruby ${{ matrix.ruby }} × AR ${{ matrix.activerecord }} × Yabeda ${{ matrix.yabeda }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: '2.7'
activerecord: '6.0'
yabeda: '0.11'
- ruby: '2.7'
activerecord: '6.1'
yabeda: '0.11'
- ruby: '3.0'
activerecord: '7.0'
yabeda: '0.11'
- ruby: '3.1'
activerecord: '7.1'
yabeda: '0.11'
- ruby: '3.2'
activerecord: 'HEAD'
yabeda: 'HEAD'
container:
image: ruby:${{ matrix.ruby }}
env:
CI: true
YABEDA_VERSION: ${{ matrix.yabeda }}
ACTIVERECORD_VERSION: ${{ matrix.activerecord }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
restore-keys: |
bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
bundle-${{ matrix.ruby }}-
- name: Upgrade Bundler to 2.x (mostly for Rubies older than 2.7)
run: gem install bundler -v '~> 2.0' -v '!= 2.2.10'
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle update
- name: Run RSpec
run: bundle exec rspec