Skip to content

Commit

Permalink
More info about versions matching or not
Browse files Browse the repository at this point in the history
  • Loading branch information
Dantemss committed Oct 18, 2024
1 parent 1e3bb33 commit d226b81
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,20 @@ jobs:
- run: yarn
- name: Ensure playwright gem and package.json versions match
run: |
ruby_playwright=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip')
capybara_playwright_version=$(
bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip'
)
echo "Playwright version compatible with capybara-playwright-driver: $capybara_playwright_version"
package_json_playwright=$(yarn list --pattern @playwright/test --json | jq '.data.trees[].name | .[17:]' -r)
[[ $ruby_playwright = $package_json_playwright ]]
echo "Playwright version in package.json: $package_json_playwright"
if [[ $ruby_gem_playwright = $package_json_playwright ]]; then
echo 'Versions match'
else
echo "Versions don't match"
exit 1
fi
# https://justin.searls.co/posts/running-rails-system-tests-with-playwright-instead-of-selenium/
- name: Cache Playwright Chromium browser
id: playwright-cache
Expand Down

0 comments on commit d226b81

Please sign in to comment.