Sha256: 089f4c421f144e72465ba5d45e58964f7948ae6bad559b028f3307135ede5897

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

version: 2.1

jobs:
  build:
    docker:
      - image: cimg/<< parameters.ruby_version >>
      - image: cimg/postgres:12.13
      - image: cimg/mysql:8.0
        environment:
          MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
    parameters:
      ruby_version:
        type: string
      gemfile:
        type: string
    environment:
      BUNDLE_GEMFILE: << parameters.gemfile >>
    steps:
      - checkout

      - run: bundle install --path vendor/bundle

      - run:
          name: Update apt
          command: sudo apt update

      - run:
          name: Install postgres client
          command: sudo apt install -y postgresql-client

      - run:
          name: Install mysql client
          command: sudo apt install -y default-mysql-client

      - run:
          name: Configure config database.yml
          command: bundle exec rake db:copy_credentials

      - run:
          name: wait for postgresql
          command: dockerize -wait tcp://localhost:5432 -timeout 1m

      - run:
          name: wait for mysql
          command: dockerize -wait tcp://localhost:3306 -timeout 1m

      - run:
          name: Database Setup
          command: |
            bundle exec rake db:test:prepare

      - run:
          name: Run tests
          command: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/test-results/rspec/rspec.xml

      - store_test_results:
          path: ~/test-results/rspec/

workflows:
  tests:
    jobs:
      - build:
          matrix:
            parameters:
              ruby_version: ["ruby:3.0.6", "ruby:3.1.4", "ruby:3.2.2"]
              gemfile:
                [
                  "gemfiles/rails_6_1.gemfile",
                  "gemfiles/rails_7_0.gemfile",
                  "gemfiles/rails_7_1.gemfile",
                ]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puzzle-apartment-2.12.0 .circleci/config.yml