forked from baron/baron-sso
fix(ci): add @playwright/test to workspace projects so pnpm exec can locate the binary locally
This commit is contained in:
@@ -420,7 +420,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
cd userfront-e2e
|
cd userfront-e2e
|
||||||
pnpm exec playwright install --with-deps chromium 2>&1 | tee ../reports/userfront-e2e-provision.log
|
../common/node_modules/.bin/playwright install --with-deps chromium 2>&1 | tee ../reports/userfront-e2e-provision.log
|
||||||
provision_exit_code=${PIPESTATUS[0]}
|
provision_exit_code=${PIPESTATUS[0]}
|
||||||
cd ..
|
cd ..
|
||||||
set -e
|
set -e
|
||||||
@@ -435,7 +435,7 @@ jobs:
|
|||||||
echo "- Exit Code: \`$provision_exit_code\`"
|
echo "- Exit Code: \`$provision_exit_code\`"
|
||||||
echo
|
echo
|
||||||
echo "## Command"
|
echo "## Command"
|
||||||
echo "\`cd userfront-e2e && pnpm exec playwright install --with-deps chromium\`"
|
echo "\`cd userfront-e2e && ../common/node_modules/.bin/playwright install --with-deps chromium\`"
|
||||||
echo
|
echo
|
||||||
echo "## Provision Log Tail (last 200 lines)"
|
echo "## Provision Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
@@ -467,7 +467,7 @@ jobs:
|
|||||||
echo "1. \`cd userfront-e2e\`"
|
echo "1. \`cd userfront-e2e\`"
|
||||||
echo "2. \`npm ci\`"
|
echo "2. \`npm ci\`"
|
||||||
echo "3. \`cd ../userfront && flutter build web --wasm --release\`"
|
echo "3. \`cd ../userfront && flutter build web --wasm --release\`"
|
||||||
echo "4. \`cd ../userfront-e2e && pnpm exec playwright install --with-deps chromium\`"
|
echo "4. \`cd ../userfront-e2e && ../common/node_modules/.bin/playwright install --with-deps chromium\`"
|
||||||
echo "5. \`pnpm run test\`"
|
echo "5. \`pnpm run test\`"
|
||||||
echo
|
echo
|
||||||
echo "## Log Tail (last 200 lines)"
|
echo "## Log Tail (last 200 lines)"
|
||||||
@@ -703,7 +703,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
cd devfront
|
cd devfront
|
||||||
pnpm exec playwright install --with-deps 2>&1 | tee ../reports/devfront-provision.log
|
../common/node_modules/.bin/playwright install --with-deps 2>&1 | tee ../reports/devfront-provision.log
|
||||||
provision_exit_code=${PIPESTATUS[0]}
|
provision_exit_code=${PIPESTATUS[0]}
|
||||||
cd ..
|
cd ..
|
||||||
set -e
|
set -e
|
||||||
@@ -718,7 +718,7 @@ jobs:
|
|||||||
echo "- Exit Code: \`$provision_exit_code\`"
|
echo "- Exit Code: \`$provision_exit_code\`"
|
||||||
echo
|
echo
|
||||||
echo "## Command"
|
echo "## Command"
|
||||||
echo "\`cd devfront && pnpm exec playwright install --with-deps\`"
|
echo "\`cd devfront && ../common/node_modules/.bin/playwright install --with-deps\`"
|
||||||
echo
|
echo
|
||||||
echo "## Provision Log Tail (last 200 lines)"
|
echo "## Provision Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
@@ -751,7 +751,7 @@ jobs:
|
|||||||
echo "## Commands"
|
echo "## Commands"
|
||||||
echo "1. \`cd devfront\`"
|
echo "1. \`cd devfront\`"
|
||||||
echo "2. \`npm ci\`"
|
echo "2. \`npm ci\`"
|
||||||
echo "3. \`pnpm exec playwright install --with-deps\`"
|
echo "3. \`../common/node_modules/.bin/playwright install --with-deps\`"
|
||||||
echo "4. \`pnpm run test\`"
|
echo "4. \`pnpm run test\`"
|
||||||
echo
|
echo
|
||||||
echo "## Log Tail (last 200 lines)"
|
echo "## Log Tail (last 200 lines)"
|
||||||
@@ -885,7 +885,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
cd orgfront
|
cd orgfront
|
||||||
pnpm exec playwright install --with-deps 2>&1 | tee ../reports/orgfront-provision.log
|
../common/node_modules/.bin/playwright install --with-deps 2>&1 | tee ../reports/orgfront-provision.log
|
||||||
provision_exit_code=${PIPESTATUS[0]}
|
provision_exit_code=${PIPESTATUS[0]}
|
||||||
cd ..
|
cd ..
|
||||||
set -e
|
set -e
|
||||||
@@ -900,7 +900,7 @@ jobs:
|
|||||||
echo "- Exit Code: \`$provision_exit_code\`"
|
echo "- Exit Code: \`$provision_exit_code\`"
|
||||||
echo
|
echo
|
||||||
echo "## Command"
|
echo "## Command"
|
||||||
echo "\`cd orgfront && pnpm exec playwright install --with-deps\`"
|
echo "\`cd orgfront && ../common/node_modules/.bin/playwright install --with-deps\`"
|
||||||
echo
|
echo
|
||||||
echo "## Provision Log Tail (last 200 lines)"
|
echo "## Provision Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
@@ -933,7 +933,7 @@ jobs:
|
|||||||
echo "## Commands"
|
echo "## Commands"
|
||||||
echo "1. \`cd orgfront\`"
|
echo "1. \`cd orgfront\`"
|
||||||
echo "2. \`npm ci\`"
|
echo "2. \`npm ci\`"
|
||||||
echo "3. \`pnpm exec playwright install --with-deps\`"
|
echo "3. \`../common/node_modules/.bin/playwright install --with-deps\`"
|
||||||
echo "4. \`pnpm run test\`"
|
echo "4. \`pnpm run test\`"
|
||||||
echo
|
echo
|
||||||
echo "## Log Tail (last 200 lines)"
|
echo "## Log Tail (last 200 lines)"
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
"zod": "^4.4.3"
|
"zod": "^4.4.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@playwright/test": "^1.60.0",
|
||||||
"@testing-library/jest-dom": "^6.9.1",
|
"@testing-library/jest-dom": "^6.9.1",
|
||||||
"@testing-library/react": "^16.3.2",
|
"@testing-library/react": "^16.3.2",
|
||||||
"@testing-library/user-event": "^14.6.1",
|
"@testing-library/user-event": "^14.6.1",
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
"test:ui": "playwright test --ui"
|
"test:ui": "playwright test --ui"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@playwright/test": "^1.60.0",
|
||||||
"@types/node": "^25.7.0",
|
"@types/node": "^25.7.0",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
"zod": "^4.4.3"
|
"zod": "^4.4.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@playwright/test": "^1.60.0",
|
||||||
"@types/node": "^25.7.0",
|
"@types/node": "^25.7.0",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ find_available_port() {
|
|||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
playwright_install_cmd=(pnpm exec playwright install)
|
playwright_install_cmd=(../common/node_modules/.bin/playwright install)
|
||||||
playwright_install_desc="pnpm exec playwright install"
|
playwright_install_desc="../common/node_modules/.bin/playwright install"
|
||||||
playwright_project_args=()
|
playwright_project_args=()
|
||||||
|
|
||||||
has_webkit_host_dependencies() {
|
has_webkit_host_dependencies() {
|
||||||
@@ -112,21 +112,21 @@ has_webkit_host_dependencies() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
playwright_install_cmd=(pnpm exec playwright install --with-deps)
|
playwright_install_cmd=(../common/node_modules/.bin/playwright install --with-deps)
|
||||||
playwright_install_desc="pnpm exec playwright install --with-deps"
|
playwright_install_desc="../common/node_modules/.bin/playwright install --with-deps"
|
||||||
elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
|
elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
|
||||||
playwright_install_cmd=(pnpm exec playwright install --with-deps)
|
playwright_install_cmd=(../common/node_modules/.bin/playwright install --with-deps)
|
||||||
playwright_install_desc="pnpm exec playwright install --with-deps"
|
playwright_install_desc="../common/node_modules/.bin/playwright install --with-deps"
|
||||||
elif ! has_webkit_host_dependencies; then
|
elif ! has_webkit_host_dependencies; then
|
||||||
playwright_install_cmd=(pnpm exec playwright install chromium firefox)
|
playwright_install_cmd=(../common/node_modules/.bin/playwright install chromium firefox)
|
||||||
playwright_install_desc="pnpm exec playwright install chromium firefox"
|
playwright_install_desc="../common/node_modules/.bin/playwright install chromium firefox"
|
||||||
playwright_project_args=(--project=chromium --project=firefox)
|
playwright_project_args=(--project=chromium --project=firefox)
|
||||||
{
|
{
|
||||||
echo "# Adminfront WebKit Skipped"
|
echo "# Adminfront WebKit Skipped"
|
||||||
echo
|
echo
|
||||||
echo "- Reason: WebKit host dependencies are not installed and this user cannot run passwordless sudo."
|
echo "- Reason: WebKit host dependencies are not installed and this user cannot run passwordless sudo."
|
||||||
echo "- Action: Running Chromium and Firefox projects only."
|
echo "- Action: Running Chromium and Firefox projects only."
|
||||||
echo "- To enable WebKit locally: run \`cd adminfront && pnpm exec playwright install-deps webkit\` with sudo privileges."
|
echo "- To enable WebKit locally: run \`cd adminfront && ../common/node_modules/.bin/playwright install-deps webkit\` with sudo privileges."
|
||||||
} > reports/adminfront-webkit-skipped.md
|
} > reports/adminfront-webkit-skipped.md
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ echo "==> adminfront using PORT=$port"
|
|||||||
(
|
(
|
||||||
cd "$tmp_dir/adminfront"
|
cd "$tmp_dir/adminfront"
|
||||||
PORT="$port" PLAYWRIGHT_WORKERS="${PLAYWRIGHT_WORKERS:-1}" \
|
PORT="$port" PLAYWRIGHT_WORKERS="${PLAYWRIGHT_WORKERS:-1}" \
|
||||||
pnpm exec playwright test "${playwright_project_args[@]}"
|
../common/node_modules/.bin/playwright test "${playwright_project_args[@]}"
|
||||||
) 2>&1 | tee reports/adminfront-test.log
|
) 2>&1 | tee reports/adminfront-test.log
|
||||||
test_exit_code=${PIPESTATUS[0]}
|
test_exit_code=${PIPESTATUS[0]}
|
||||||
set -e
|
set -e
|
||||||
@@ -217,7 +217,7 @@ if [ "$test_exit_code" -ne 0 ]; then
|
|||||||
echo "1. \`cd adminfront\`"
|
echo "1. \`cd adminfront\`"
|
||||||
echo "2. \`npm install -g pnpm && pnpm install -C ../common\`"
|
echo "2. \`npm install -g pnpm && pnpm install -C ../common\`"
|
||||||
echo "3. \`${playwright_install_desc}\`"
|
echo "3. \`${playwright_install_desc}\`"
|
||||||
echo "4. \`pnpm exec playwright test\`"
|
echo "4. \`../common/node_modules/.bin/playwright test\`"
|
||||||
echo
|
echo
|
||||||
echo "## Log Tail (last 200 lines)"
|
echo "## Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
|
|||||||
Reference in New Issue
Block a user