Skip to content

fix spec

fix spec #13

Workflow file for this run

name: Test & lint
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
- feature/github_action
jobs:
spec:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} w/ ${{ matrix.gemfile }}
strategy:
fail-fast: false
matrix:
ruby:
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
gemfile:
- active_support_60
- active_support_61
- active_support_70
- active_support_71
exclude:
- ruby: "2.6"
gemfile: active_support_70
- ruby: "2.6"
gemfile: active_support_71
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH: "gemfiles/vendor/bundle"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
# - name: Create bundler lockfile
# run: |
# bundle lock
- uses: actions/cache@v3
with:
# NOTE: Bundler expands the path relative to the gemfile, not the
# current directory.
path: ./gemfiles/vendor/bundle
key: bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ hashFiles( 'gemfiles/*.lock' ) }}
restore-keys: |
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-
# - name: Install gems
# run: |
# bundle install --jobs 4
- name: Run tests
run: bundle exec rspec
# standardrb:
# runs-on: ubuntu-latest
# name: StandardRB
# steps:
# - uses: actions/checkout@v4
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: "3.2"
# bundler-cache: true
# - name: Run StandardRB
# run: bundle exec standardrb
# - name: Run RuboCop
# run: bundle exec rubocop