name: Ruby

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.3
    - name: Setup knapsack_pro gem locally
      env:
        RAILS_ENV: test
        RACK_ENV: test
        KNAPSACK_PRO_REPO_PATH: ~/gems/knapsack_pro-ruby
      run: |
        mkdir ~/gems
        cd ~/gems && (git clone -b $GITHUB_REF --single-branch https://github.com/KnapsackPro/knapsack_pro-ruby.git || git clone -b master --single-branch https://github.com/KnapsackPro/knapsack_pro-ruby.git)
        cd ~/gems/knapsack_pro-ruby && git branch
        cd ~/gems/knapsack_pro-ruby && git log -n 1 | more
    - name: Build and run tests
      run: |
        gem install bundler
        bundle install --jobs 4 --retry 3
        bundle exec rspec spec

name: Ruby

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.3
    - name: Setup knapsack_pro gem locally
      run: |
        mkdir ~/gems
        cd ~/gems && (git clone -b $GITHUB_REF --single-branch https://github.com/KnapsackPro/knapsack_pro-ruby.git || git clone -b master --single-branch https://github.com/KnapsackPro/knapsack_pro-ruby.git)
        cd ~/gems/knapsack_pro-ruby && git branch
        cd ~/gems/knapsack_pro-ruby && git log -n 1 | more
    - name: Build and run tests
      env:
        RAILS_ENV: test
        RACK_ENV: test
        KNAPSACK_PRO_REPO_PATH: ~/gems/knapsack_pro-ruby
      run: |
        gem install bundler
        bundle install --jobs 4 --retry 3
        bundle exec rspec spec

Move envs to build and run tests step
Move envs to build and run tests step
