Skip to content

fix: allow using active_model_serializers in associations (compat) #93

fix: allow using active_model_serializers in associations (compat)

fix: allow using active_model_serializers in associations (compat) #93

Workflow file for this run

name: build
on:
push:
branches:
- master
- main
pull_request:
branches:
- '**'
jobs:
build:
name: RSpec
runs-on: ${{ matrix.os }}
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: [
"3.0",
"3.1"
]
gemfile: [
"Gemfile-rails.6.1.x",
"Gemfile-rails.7.0.x"
]
experimental: [false]
include:
- ruby: "2.7"
os: ubuntu-latest
gemfile: Gemfile-rails.6.1.x
experimental: false
- ruby: "3.2"
os: ubuntu-latest
gemfile: Gemfile-rails.7.0.x
experimental: false
- ruby: "3.2"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
experimental: true
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run tests
run: bin/rspec
- name: Upload code coverage to Code Climate
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}}
- name: Upload coverage results to GitHub
uses: actions/upload-artifact@main
with:
name: coverage-report
path: coverage
- name: Run benchmarks
run: BENCHMARK="true" bin/rspec benchmarks --pattern "**/*_benchmark.rb"