Update circleci config

This commit is contained in:
Eugene Burmakin 2025-05-29 12:05:50 +02:00
parent 2f1d428a40
commit 68165c47f6
2 changed files with 17 additions and 0 deletions

View file

@ -19,6 +19,9 @@ jobs:
- image: redis:7.0
- image: selenium/standalone-chrome:latest
name: chrome
environment:
START_XVFB: 'false'
JAVA_OPTS: -Dwebdriver.chrome.whitelistedIps=
steps:
- checkout
@ -30,6 +33,10 @@ jobs:
- run:
name: Bundle Install
command: bundle install --jobs=4 --retry=3
- run:
name: Wait for Selenium Chrome
command: |
dockerize -wait tcp://chrome:4444 -timeout 1m
- run:
name: Database Setup
command: |
@ -40,6 +47,8 @@ jobs:
command: bundle exec rspec
- store_artifacts:
path: coverage
- store_artifacts:
path: tmp/capybara
workflows:
rspec:

View file

@ -46,6 +46,14 @@ RSpec.configure do |config|
# Configure Capybara for CI environments
if ENV['CI']
# Setup for CircleCI
Capybara.server = :puma, { Silent: true }
# Make the app accessible to Chrome in the Docker network
ip_address = Socket.ip_address_list.detect(&:ipv4_private?).ip_address
host! "http://#{ip_address}"
Capybara.server_host = ip_address
Capybara.app_host = "http://#{ip_address}:#{Capybara.server_port}"
driven_by :selenium, using: :headless_chrome, options: {
browser: :remote,
url: "http://chrome:4444/wd/hub",