anchor.diff:      steps:
         - setup
   
  -      <% if selected?(:database, :postgresql) %>
  +      <%- if selected?(:background_processor) -%>
  +      - run:
  +          name: Wait for redis service
  +          command: dockerize -wait tcp://localhost:6379 -timeout 1m
  +      <%- end -%>
  +      <%- if selected?(:database, :postgresql) -%>
         - run:
             name: Wait for postgres service
             command: dockerize -wait tcp://localhost:5432 -timeout 1m
  -      <% end %>
   
  -      <% if selected?(:background_processor) %>
  -      - run:
  -          name: Wait for redis service
  -          command: dockerize -wait tcp://localhost:6379 -timeout 1m
  -      <% end %>
  -
  -      <% if selected?(:database, :postgresql) %>
         - run:
             name: Setup database
             command: bundle exec rails db:create db:schema:load
  -      <% end %>
  +      <%- end -%>
   
         - run:
             name: Run rspec
  
positive.code: version: 2.1
  
  ruby-image: &ruby-image circleci/ruby:<%= ruby_version %>
  <% if selected?(:database, :postgresql) %>
  postgres-image: &postgres-image postgres:<%= Potassium::POSTGRES_VERSION %>
  <% end %>
  <% if selected?(:background_processor) %>
  redis-image: &redis-image redis
  <% end %>
  env-vars: &env-vars
    BUNDLE_JOBS: 4
    BUNDLE_PATH: vendor/bundle
  
negative.code:             RSPEC_FORMAT_ARGS="-f progress --no-color -p 10"
              bundle exec rspec spec $RSPEC_FORMAT_ARGS $RSPEC_JUNIT_ARGS
  
        <%- if selected?(:front_end, :vue) -%>
        - run:
            name: Run jest
            command: yarn run test
        <%- end -%>
  
        - store_test_results:
            path: test_results
  