Skip to content

Commit

Permalink
Trigger download of chrome/chromedriver binaries in CI
Browse files Browse the repository at this point in the history
When a new chrome or chromedriver version is available, the CI build
updates it. In fact, each of the 32 rspec processes will try to download
the new version and then run chromedriver. This leads to problems as the
chromedriver binary being run may still be downloaded by another rspec
process. This leads to the following error: "Text file busy".

This commit adds a step to the CI build that downloads the binaries
before the tests are run.
  • Loading branch information
cbliard committed Aug 25, 2023
1 parent b0436bd commit 11b62e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ setup_tests() {

# create test database "app" and dump schema because db/structure.sql is not checked in
execute_quiet "time bundle exec rails db:migrate db:schema:dump zeitwerk:check"

# pre-cache browsers and their drivers binaries
execute "$(bundle show selenium)/bin/linux/selenium-manager --browser chrome --debug"
execute "$(bundle show selenium)/bin/linux/selenium-manager --browser firefox --debug"
}

run_units() {
Expand Down

0 comments on commit 11b62e2

Please sign in to comment.