version: 2.1
orbs:
  ruby: circleci/ruby@1.8.0

executors:
  libraries:
    docker:
      - image: ruby:2.7.6-slim-bullseye
        environment:
          PGHOST: 127.0.0.1
          PGUSER: postgres
      - image: circleci/postgres:9.6-alpine
        environment:
          POSTGRES_USER: postgres
          POSTGRES_DB: libraries_test
          POSTGRES_PASSWORD: ""
      - image: redis:3.2-alpine
      - image: elasticsearch:2.4.4
        environment:
          - cluster.name: elasticsearch
          - action.auto_create_index: true
jobs:
  test:
    parallelism: 4
    executor: libraries
    steps:
      - checkout
      - run: apt-get -y -qq update
      - run: apt-get -y --no-install-recommends install cmake libpq-dev git-core build-essential libicu-dev pkg-config
      - ruby/install-deps
      - ruby/rspec-test

workflows:
  version: 2
  test:
    jobs:
      - test

version: 2.1
orbs:
  ruby: circleci/ruby@1.8.0

executors:
  libraries:
    docker:
      - image: ruby:2.7.6-slim-bullseye
        environment:
          PGHOST: 127.0.0.1
          PGUSER: postgres
      - image: circleci/postgres:9.6-alpine
        environment:
          POSTGRES_USER: postgres
          POSTGRES_DB: libraries_test
          POSTGRES_PASSWORD: ""
      - image: redis:3.2-alpine
      - image: elasticsearch:2.4.4
        environment:
          - cluster.name: elasticsearch
          - action.auto_create_index: true
jobs:
  test:
    parallelism: 4
    executor: libraries
    steps:
      - checkout
      - run: apt-get -y -qq update
      - run: apt-get -y --no-install-recommends install cmake libpq-dev git-core build-essential libicu-dev pkg-config nodejs
      - ruby/install-deps
      - ruby/rspec-test

workflows:
  version: 2
  test:
    jobs:
      - test

Add node, to fix test inside container with newer orb:
Add node, to fix test inside container with newer orb:

ExecJS::RuntimeUnavailable:
  Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
