mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Update circleci config
This commit is contained in:
parent
2f1d428a40
commit
68165c47f6
2 changed files with 17 additions and 0 deletions
|
|
@ -19,6 +19,9 @@ jobs:
|
||||||
- image: redis:7.0
|
- image: redis:7.0
|
||||||
- image: selenium/standalone-chrome:latest
|
- image: selenium/standalone-chrome:latest
|
||||||
name: chrome
|
name: chrome
|
||||||
|
environment:
|
||||||
|
START_XVFB: 'false'
|
||||||
|
JAVA_OPTS: -Dwebdriver.chrome.whitelistedIps=
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
@ -30,6 +33,10 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Bundle Install
|
name: Bundle Install
|
||||||
command: bundle install --jobs=4 --retry=3
|
command: bundle install --jobs=4 --retry=3
|
||||||
|
- run:
|
||||||
|
name: Wait for Selenium Chrome
|
||||||
|
command: |
|
||||||
|
dockerize -wait tcp://chrome:4444 -timeout 1m
|
||||||
- run:
|
- run:
|
||||||
name: Database Setup
|
name: Database Setup
|
||||||
command: |
|
command: |
|
||||||
|
|
@ -40,6 +47,8 @@ jobs:
|
||||||
command: bundle exec rspec
|
command: bundle exec rspec
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: coverage
|
path: coverage
|
||||||
|
- store_artifacts:
|
||||||
|
path: tmp/capybara
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
rspec:
|
rspec:
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,14 @@ RSpec.configure do |config|
|
||||||
# Configure Capybara for CI environments
|
# Configure Capybara for CI environments
|
||||||
if ENV['CI']
|
if ENV['CI']
|
||||||
# Setup for CircleCI
|
# 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: {
|
driven_by :selenium, using: :headless_chrome, options: {
|
||||||
browser: :remote,
|
browser: :remote,
|
||||||
url: "http://chrome:4444/wd/hub",
|
url: "http://chrome:4444/wd/hub",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue