8000 chore(site): add remote playwright support and script by mafredri · Pull Request #10445 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore(site): add remote playwright support and script #10445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
shellcheck
  • Loading branch information
mafredri committed Nov 9, 2023
commit 4aff413b7677c1d1ae10259588138c24311a5a43
2 changes: 2 additions & 0 deletions scripts/remote_playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ main() {
# necessary because Playwright uses their own protocol for communicating
# between the server and client, and the protocol changes between versions.
echo "Checking Playwright version from \"${workspace}\"..."
# shellcheck disable=SC2029 # This is intended to expand client-side.
playwright_version="$(ssh "coder.${workspace}" "cat '${coder_repo}'/site/pnpm-lock.yaml | grep '^ /@playwright/test@' | cut -d '@' -f 3 | tr -d ':'")"

echo "Found Playwright version ${playwright_version}..."
Expand Down Expand Up @@ -75,6 +76,7 @@ main() {

echo
echo "Starting SSH tunnel, run test via \"pnpm run playwright:test\"..."
# shellcheck disable=SC2029 # This is intended to expand client-side.
ssh -t -R "${ws_port}:127.0.0.1:${ws_port}" -L "${port}:127.0.0.1:${port}" coder."${workspace}" "export CODER_E2E_PORT='${port}'; export CODER_E2E_WS_ENDPOINT='${ws_endpoint}'; [[ -d '${coder_repo}/site' ]] && cd '${coder_repo}/site'; exec \"\$(grep \"\${USER}\": /etc/passwd | cut -d: -f7)\" -i -l"
}

Expand Down
0