From 606577f2572762e44af760680c9897d713acaa51 Mon Sep 17 00:00:00 2001 From: Pranav Zinzurde Date: Fri, 3 Jul 2026 11:07:01 +0530 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20fix=20CLI-from-git=20setup=20?= =?UTF-8?q?=E2=80=94=20put=20yarn=20global=20bin=20on=20PATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'npx percy --version' after 'yarn remove @percy/cli' resolved nothing locally, so npx downloaded the unrelated public 'percy' package and the step failed. Mirror percy-capybara: expose $(yarn global bin) on PATH after 'yarn global:link' and call 'percy' directly. Also route the branch input through env instead of inline interpolation. Co-Authored-By: Claude Fable 5 --- .github/workflows/test.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cdc8cf7..0cdd44e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,16 +51,25 @@ jobs: - run: yarn - name: Set up @percy/cli from git if: ${{ github.event_name == 'workflow_dispatch' }} + env: + BRANCH: ${{ github.event.inputs.branch }} run: | cd /tmp - git clone --branch ${{ github.event.inputs.branch }} --depth 1 https://github.com/percy/cli + git clone --branch "$BRANCH" --depth 1 https://github.com/percy/cli cd cli PERCY_PACKAGES=`find packages -mindepth 1 -maxdepth 1 -type d | sed -e 's/packages/@percy/g' | tr '\n' ' '` git log -1 yarn yarn build yarn global:link - cd ${{ github.workspace }} - yarn remove @percy/cli && yarn link `echo $PERCY_PACKAGES` - npx percy --version + # Expose the freshly built `percy` on PATH. yarn link symlinks the + # package but not its bin, so `npx percy` would miss it and download + # the unrelated public `percy`. Link is best-effort; PATH is what + # makes percy resolvable. + echo "$(yarn global bin)" >> "$GITHUB_PATH" + export PATH="$(yarn global bin):$PATH" + cd ${{ github.workspace }} + yarn remove @percy/cli >/dev/null 2>&1 || true + yarn link `echo $PERCY_PACKAGES` >/dev/null 2>&1 || true + percy --version - run: npx percy exec --testing -- bundle exec rspec From 737bd9a95924057cafda49440564546e7bfc43c3 Mon Sep 17 00:00:00 2001 From: Pranav Zinzurde Date: Fri, 3 Jul 2026 12:20:53 +0530 Subject: [PATCH 2/2] test: silence selenium :browser_options deprecation in specs Newer selenium-webdriver (deps are unlocked, no Gemfile.lock) logs a [DEPRECATION] [:browser_options] warning to stdout on first driver init, via Capybara's built-in :selenium_headless registration. The suite asserts exact stdout with output(...).to_stdout, so whichever example first boots the driver inside such a block fails, seed- dependently (percy_spec.rb:110 in CI run 28640844709). Ignore just that deprecation id, guarded for loggers without #ignore. Co-Authored-By: Claude Fable 5 --- spec/spec_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 070742f..894f047 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -38,6 +38,16 @@ Capybara.default_driver = :selenium_headless Capybara.javascript_driver = :selenium_headless + # Capybara's built-in :selenium_headless driver still passes `options:` to + # driver init, which newer selenium-webdriver logs as a [DEPRECATION] + # [:browser_options] warning on first use. The suite asserts exact stdout + # via `output(...).to_stdout`, so any example that first boots the driver + # inside such a block fails on that extra line (seed-dependent). Silence + # just that deprecation id. + if Selenium::WebDriver.logger.respond_to?(:ignore) + Selenium::WebDriver.logger.ignore(:browser_options) + end + # Setup for Capybara to test Jekyll static files served by Rack Capybara.server_port = 3003 Capybara.server = :puma, { Silent: true }