version: 2.1
orbs:
  browser-tools: circleci/browser-tools@1.1
jobs:
  test-job:
    working_directory: ~/jpmobile
    docker:
      - image: cimg/ruby:3.0-browsers
        environment:
          BUNDLE_JOBS: 3
          BUNDLE_RETRY: 3
          BUNDLE_PATH: vendor/bundle
          RAILS_ENV: test
    steps:
      - browser-tools/install-browser-tools
      - checkout

      # Install dependent packages
      - run:
          name: Install dependent packages
          command: |
            sudo apt update
            sudo apt install -y cmake libsqlite3-dev

      # Which version of bundler?
      - run:
          name: Which bundler?
          command: bundle -v

      # Restore bundle cache
      - restore_cache:
          keys:
            - jpmobile-bundle-v1-{{ checksum "Gemfile.lock" }}

      - run:
          name: Bundle Install
          command: bundle check || bundle install --deployment --path vendor/bundler

      # Store bundle cache
      - save_cache:
          key: jpmobile-bundle-v1-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle

      # rubocop
      - run:
          name: rubocop
          command: |
            bundle exec rubocop
          environment:
            BUNDLE_GEMFILE: ~/jpmobile/Gemfile

      # Run rspec in parallel
      - run:
          name: test
          command: |
            bundle exec rake test

          environment:
            BUNDLE_GEMFILE: ~/jpmobile/Gemfile
workflows:
  version: 2
  run-test:
    jobs:
      - test-job

version: 2.1
orbs:
  browser-tools: circleci/browser-tools@1.1
jobs:
  test-job:
    working_directory: ~/jpmobile
    docker:
      - image: cimg/ruby:3.0-browsers
        environment:
          BUNDLE_JOBS: 3
          BUNDLE_RETRY: 3
          BUNDLE_PATH: vendor/bundle
          RAILS_ENV: test
    steps:
      - browser-tools/install-browser-tools
      - checkout

      # Install dependent packages
      - run:
          name: Install dependent packages
          command: |
            sudo apt update
            sudo apt install -y cmake libsqlite3-dev

      # Which version of bundler?
      - run:
          name: Which bundler?
          command: bundle -v

      # Restore bundle cache
      - restore_cache:
          keys:
            - jpmobile-bundle-v1-{{ checksum "Gemfile.lock" }}

      - run:
          name: Bundle Install
          command: |
            bundle config set --local clean true
            bundle config set --local path vendor/bundle
            bundle check || bundle install

      # Store bundle cache
      - save_cache:
          key: jpmobile-bundle-v1-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle

      # rubocop
      - run:
          name: rubocop
          command: |
            bundle exec rubocop
          environment:
            BUNDLE_GEMFILE: ~/jpmobile/Gemfile

      # Run rspec in parallel
      - run:
          name: test
          command: |
            bundle exec rake test

          environment:
            BUNDLE_GEMFILE: ~/jpmobile/Gemfile
workflows:
  version: 2
  run-test:
    jobs:
      - test-job

Replace deprecated bundle install options
Replace deprecated bundle install options

This is just a tiny refactor.
