Skip to content

tests: move Playwright CI to stock image#3995

Open
bznein wants to merge 1 commit into
BitBoxSwiss:masterfrom
bznein:playwright-stock-image
Open

tests: move Playwright CI to stock image#3995
bznein wants to merge 1 commit into
BitBoxSwiss:masterfrom
bznein:playwright-stock-image

Conversation

@bznein
Copy link
Copy Markdown
Collaborator

@bznein bznein commented Apr 9, 2026

Run the Playwright job in the upstream Playwright container and adapt the regtest/AOPP test setup to that environment.

Running on the Playwright container saves us the step of installing browsers, which can take a few minutes; sometimes, depending on network conditions, even up to 15.

Install the missing CI dependencies, make the regtest services reachable from the containerized job, add an RBTC electrum host override for CI, and harden the AOPP helper for raw signature recovery and missing RIPEMD160 support.

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented Apr 22, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@bznein has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 3 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e55e6479-d361-4bb5-a832-f0a5aab1b693

📥 Commits

Reviewing files that changed from the base of the PR and between a317941 and 7dddcba.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • backend/backend.go
  • frontends/web/tests/helpers/regtest.ts
  • frontends/web/tests/util/aopp/server.py
  • scripts/run_regtest.sh
📝 Walkthrough

Walkthrough

This pull request refactors the regtest infrastructure to use Docker containers and named volumes instead of host filesystem directories. The CI configuration is updated to run Playwright tests in a containerized environment with Docker access, while the backend now reads the Electrum server host from an environment variable. Test helpers add Docker volume cleanup, the Python test server adds RIPEMD-160 backend fallback logic, and the regtest startup script replaces temporary directories with Docker-managed volumes and adjusts network configuration to use explicit port publishing instead of host networking.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/run_regtest.sh`:
- Line 88: Replace the unquoted command substitution fragment "-u $(id -u
$USER)" with a quoted form to prevent word-splitting and ensure the user
variable is also quoted, e.g. use "-u \"$(id -u \"$USER\")\"" (apply the same
change to the identical occurrence earlier in the script referenced by the
similar unquoted "$(id -u $USER)" usage on line 70); update both spots so the
command substitution and $USER are properly quoted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eee05cc7-45d8-4004-b5cf-dab5c355fed6

📥 Commits

Reviewing files that changed from the base of the PR and between 415c476 and a317941.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • backend/backend.go
  • frontends/web/tests/helpers/regtest.ts
  • frontends/web/tests/util/aopp/server.py
  • scripts/run_regtest.sh

Comment thread scripts/run_regtest.sh Outdated
@bznein bznein force-pushed the playwright-stock-image branch from a317941 to 7dddcba Compare May 11, 2026 15:15
@bznein bznein requested a review from a team as a code owner May 11, 2026 15:15
@bznein bznein requested a review from benma May 11, 2026 15:16
@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented May 11, 2026

I left this onse on hold for a while as there were more pressing things, but I think now it's a good time to get this merged, as it can drastically improve run times for playwright

Comment thread .github/workflows/ci.yml Outdated
runs-on: ubuntu-22.04
needs: test-lint
container:
# Keep this in sync with frontends/web/package-lock.json.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case I update the lock file like here: #4144 is there anything else I should change to "keep in sync frontends/web/package-lock.json." ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the PR were to up[date the version of playwright to, let's say, 1.58.0, you would need to update it below as well.

Let me know if the comment is not clear and we should update it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍 , but in that case I think it makes sense to change to where the playwright devDependency is defined:

Suggested change
# Keep this in sync with frontends/web/package-lock.json.
# Keep this in sync with frontends/web/package.json.

Comment thread .github/workflows/ci.yml
run: |
cd frontends/web
npm install
npm ci
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread .github/workflows/ci.yml
npx playwright install --with-deps chromium
else
npx playwright install --with-deps webkit
fi
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's the main winner. Sometime it takes very little time, but it can be super annoying when it takes so much

Run the Playwright job in the upstream Playwright container and adapt
the regtest/AOPP  test setup to that environment.

Running on the Playwright container saves us the step of installing
browsers, which can take a few minutes; sometimes, depending on network
conditions, even up to 15.

Install the missing CI dependencies, make the regtest services reachable
from the containerized job, add an RBTC electrum host override for CI,
and harden the AOPP helper for raw signature recovery and missing
RIPEMD160 support.
@bznein bznein force-pushed the playwright-stock-image branch from 7dddcba to 952116f Compare May 14, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants