Skip to content

Provide access to underlying model during build/update/save process closer mirroring rails patterns #137

Provide access to underlying model during build/update/save process closer mirroring rails patterns

Provide access to underlying model during build/update/save process closer mirroring rails patterns #137

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request: {}
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
bundler-cache: true
- name: Run standardrb
run: bundle exec standardrb --no-fix --format progress
test:
name: "Tests - ${{ matrix.ruby }} | ${{ matrix.gemfile }} | Appraisal: ${{ matrix.appraisal }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
gemfile:
- Gemfile
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6.gemfile
- gemfiles/rails_7.gemfile
- gemfiles/rails_5_2_graphiti_rails.gemfile
- gemfiles/rails_6_graphiti_rails.gemfile
- gemfiles/rails_7_graphiti_rails.gemfile
- gemfiles/rails_7_1_graphiti_rails.gemfile
appraisal:
- true
- false
include:
- ruby: ruby-head
gemfile: gemfiles/rails_7_1.gemfile
appraisal: true
- ruby: ruby-head
gemfile: Gemfile
appraisal: false
exclude:
# Skip some extra variants
- gemfile: Gemfile
appraisal: true
- gemfile: gemfiles/rails_5_2.gemfile
appraisal: false
- gemfile: gemfiles/rails_6.gemfile
appraisal: false
- gemfile: gemfiles/rails_7.gemfile
appraisal: false
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_6_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_7_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_7_1_graphiti_rails.gemfile
appraisal: false
# Rails 5 can't run on Ruby 3
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.0
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.0
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.1
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.1
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.2
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.2
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.3
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.3
continue-on-error: ${{ matrix.ruby == 'ruby-head' }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
steps:
- name: Set up Appraisal
if: matrix.appraisal
run: echo "APPRAISAL_INITIALIZED=true" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec
publish:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: [test]
steps:
- name: Dispatch Release
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Generate New Release
token: ${{ secrets.GITHUB_TOKEN }}