Allow all options to accept callable values with differrent number of… #415
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
runs-on: ubuntu-22.04 | |
name: Ruby ${{ matrix.ruby }} (AR ${{ matrix.activerecord }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# https://github.com/ruby/setup-ruby | |
- ruby: "head" | |
activerecord: "7.0" | |
- ruby: "3.2" | |
activerecord: "7.0" | |
- ruby: "3.1" | |
activerecord: "7.0" | |
- ruby: "3.0" | |
activerecord: "7.0" | |
- ruby: "2.7" | |
activerecord: "7.0" | |
- ruby: "2.7" | |
activerecord: "6.1" | |
- ruby: "2.7" | |
activerecord: "5.2" | |
- ruby: "2.6" | |
activerecord: "6.1" | |
- ruby: "2.6" | |
activerecord: "5.2" | |
- ruby: "jruby-9.4.2" | |
activerecord: "6.1" | |
- ruby: "jruby-9.4.2" | |
activerecord: "7.0" | |
- ruby: "truffleruby-23.0.0" | |
activerecord: "7.0" | |
- ruby: "truffleruby-23.0.0" | |
activerecord: "6.1" | |
env: | |
BUNDLE_GEMFILE: gemfiles/${{ matrix.activerecord }}.gemfile | |
CC_TEST_REPORTER_ID: 2b0dd65d1c078b0d9f6edc768751ab9f210decdace1eae9651603a6bccff96ca | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v3 | |
# https://github.com/ruby/setup-ruby | |
- name: Set up Ruby ${{ matrix.ruby }} (AR ${{ matrix.activerecord }}) | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
# Check code standards only for latest MRI. It takes a lot of time for jruby or truffleruby | |
- name: Check Code Standards | |
if: startsWith(matrix.ruby, '3.2') && matrix.activerecord == '7.0' | |
run: bundle exec rubocop | |
- name: Run Tests | |
run: bundle exec rspec | |
- name: Markdown linter | |
if: startsWith(matrix.ruby, '3.2') && matrix.activerecord == '7.0' | |
run: bundle exec mdl README.md CHANGELOG.md RELEASE.md | |
# https://github.com/paambaati/codeclimate-action | |
- name: Publish code coverage to code-climate | |
uses: paambaati/codeclimate-action@v3.2 | |
if: (github.event_name == 'push') && startsWith(matrix.ruby, '3.2') |