name: ci

on:
  push:
    paths:
      - .github/workflows/custom_ci.yml
      - lib/**
      - spec/**
      - Gemfile
      - Gemfile.devtools
      - "*.gemspec"
  pull_request:

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: ["2.7", "2.6", "2.5", "2.4", "jruby"]
        include:
          - ruby: "2.7"
            dry_schema_from_master: "true"
            dry_types_from_master: "true"
            coverage: "false"
          - ruby: "2.7"
            dry_schema_from_master: "false"
            dry_types_from_master: "false"
            coverage: "true"
    steps:
      - uses: actions/checkout@v1
      - name: Set up Ruby
        uses: eregon/use-ruby-action@master
        with:
          ruby-version: ${{matrix.ruby}}
      - name: Run all tests
        env:
          DRY_SCHEMA_FROM_MASTER: ${{matrix.dry_schema_from_master}}
          DRY_TYPES_FROM_MASTER: ${{matrix.dry_types_from_master}}
          COVERAGE: ${{matrix.coverage}}
          CODACY_RUN_LOCAL: true
          CODACY_PROJECT_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
        run: |
          gem install bundler
          bundle install --jobs 4 --retry 3 --without tools docs benchmarks
          bundle exec rake

name: ci

on:
  push:
    paths:
      - .github/workflows/custom_ci.yml
      - lib/**
      - spec/**
      - Gemfile
      - Gemfile.devtools
      - "*.gemspec"
  pull_request:

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: ["2.7", "2.6", "2.5", "2.4", "jruby"]
        include:
          - ruby: "2.7"
            dry_schema_from_master: "true"
            dry_types_from_master: "true"
            coverage: "true"
    steps:
      - uses: actions/checkout@v1
      - name: Set up Ruby
        uses: eregon/use-ruby-action@master
        with:
          ruby-version: ${{matrix.ruby}}
      - name: Run all tests
        env:
          DRY_SCHEMA_FROM_MASTER: ${{matrix.dry_schema_from_master}}
          DRY_TYPES_FROM_MASTER: ${{matrix.dry_types_from_master}}
          COVERAGE: ${{matrix.coverage}}
          CODACY_RUN_LOCAL: true
          CODACY_PROJECT_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
        run: |
          gem install bundler
          bundle install --jobs 4 --retry 3 --without tools docs benchmarks
          bundle exec rake

Use deps from master for 2.7
Use deps from master for 2.7
