Skip to content

Commit 1b3914a

Browse files
authored
gh-153313: Run Emscripten PyRepl test in CI (#153701)
Adds the PyRepl test to the Github CI configuration for Emscripten.
1 parent 6ae740c commit 1b3914a

4 files changed

Lines changed: 24 additions & 20 deletions

File tree

.github/workflows/reusable-emscripten.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ jobs:
7777
run: python3 Platforms/emscripten pythoninfo-host
7878
- name: "Test"
7979
run: python3 Platforms/emscripten run --test
80+
- name: "Test Repl"
81+
run: Platforms/emscripten/browser_test/run_test.sh

Platforms/emscripten/browser_test/package-lock.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Platforms/emscripten/browser_test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"license": "ISC",
1111
"description": "",
1212
"dependencies": {
13-
"@playwright/test": "^1.54.1",
13+
"@playwright/test": "^1.61.1",
1414
"@types/node": "^24.12.0",
1515
"get-port-cli": "^3.0.0",
1616
"http-server": "^14.1.1",
17-
"playwright": "^1.54.1"
17+
"playwright": "^1.61.1"
1818
}
1919
}

Platforms/emscripten/browser_test/run_test.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
set -euo pipefail
33
cd "$(dirname "$0")"
44
rm -f test_log.txt
5-
echo "Installing node packages" | tee test_log.txt
5+
echo "Installing node packages" | tee -a test_log.txt
66
npm ci >> test_log.txt 2>&1
7-
echo "Installing playwright browsers" | tee test_log.txt
7+
echo "Installing playwright browsers" | tee -a test_log.txt
88
npx playwright install 2>> test_log.txt
9-
export PORT=$(npx get-port-cli)
10-
echo "Running tests with webserver on port $PORT" | tee test_log.txt
11-
CI=1 npx playwright test | tee test_log.txt
9+
# Disable color so FORCE_COLOR=1 (set in CI) doesn't wrap the port number in
10+
# ANSI escape codes, which would produce an invalid baseURL in Playwright.
11+
export PORT=$(FORCE_COLOR=0 npx get-port-cli)
12+
echo "Running tests with webserver on port $PORT" | tee -a test_log.txt
13+
CI=1 npx playwright test | tee -a test_log.txt

0 commit comments

Comments
 (0)