# Use the latest 2.1 version of CircleCI pipeline process engine. # See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 # Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. # See: https://circleci.com/docs/2.0/orb-intro/ orbs: ruby: circleci/ruby@0.1.2 # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: build: docker: - image: circleci/ruby:2.6.3-stretch-node executor: ruby/default steps: - checkout - run: name: Which bundler? command: bundle -v - ruby/bundle-install - run: name: Run linter command: bundle exec rubocop - run: name: Run rspec command: bundle exec rspec test_rails5: docker: - image: cimg/ruby:2.7.4-node executor: ruby/default steps: - checkout - run: name: Install dependencies command: sudo apt-get update -y && sudo apt-get install -y libsqlite3-dev - run: name: Which bundler? command: bundle -v - run: name: Bundle install command: cd example/rails5 && bundle install --path vendor/bundle - run: name: Setup db command: cd example/rails5 && bundle exec rails db:migrate - run: name: Run test command: cd example/rails5 && bundle exec rake test # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: build_and_test: # This is the name of the workflow, feel free to change it to better match your workflow. # Inside the workflow, you define the jobs you want to run. jobs: - build - test_rails5: requires: - build