github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/circle/testdata/orbs-ruby/example1.yaml (about)

     1  # https://circleci.com/developer/orbs/orb/circleci/ruby#usage-ruby_rails_sample_app
     2  
     3  version: '2.1'
     4  orbs:
     5    node: circleci/node@x.y
     6    ruby: circleci/ruby@x.y
     7  jobs:
     8    build:
     9      docker:
    10        - image: cimg/ruby:2.7-node
    11      steps:
    12        - checkout
    13        - ruby/install-deps
    14        - node/install-packages:
    15            cache-key: yarn.lock
    16            pkg-manager: yarn
    17    checking:
    18      docker:
    19        - image: cimg/ruby:2.7-node
    20      steps:
    21        - checkout
    22        - ruby/install-deps
    23        - ruby/rubocop-check:
    24            format: progress
    25            label: Inspecting with Rubocop
    26    test:
    27      docker:
    28        - image: cimg/ruby:2.7-node
    29        - environment:
    30            POSTGRES_DB: rails_blog_test
    31            POSTGRES_PASSWORD: ''
    32            POSTGRES_USER: circleci-demo-ruby
    33          image: circleci/postgres:9.5-alpine
    34      environment:
    35        BUNDLE_JOBS: '3'
    36        BUNDLE_RETRY: '3'
    37        PGHOST: 127.0.0.1
    38        PGPASSWORD: ''
    39        PGUSER: circleci-demo-ruby
    40        RAILS_ENV: test
    41      parallelism: 3
    42      steps:
    43        - checkout
    44        - ruby/install-deps
    45        - node/install-packages:
    46            cache-key: yarn.lock
    47            pkg-manager: yarn
    48        - run:
    49            command: dockerize -wait tcp://localhost:5432 -timeout 1m
    50            name: Wait for DB
    51        - run:
    52            command: bundle exec rails db:schema:load --trace
    53            name: Database setup
    54        - ruby/rspec-test:
    55            include: spec/**/*_spec.rb
    56  workflows:
    57    build_and_test:
    58      jobs:
    59        - build
    60        - checking
    61        - test:
    62            requires:
    63              - build