mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
A failed inspect or conversion hid the progress panel that held the conversion log, cleared the selected archives and showed a single line, so the only evidence of the failure was gone and a multi-GB input had to be picked again. Compose the message with the phase, the current input, the target, the libraries tag and the last 150 log lines, and show it in the error box under "Failure details" so it can be copied into a report. The report is a pure function in failure-report.mjs and is covered by node tests.
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
name: Web tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/web-tests.yml
|
|
- demo/web/**
|
|
- tools/test_web.py
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: web-tests-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
output-directory:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
- name: Test archive root selection
|
|
shell: bash
|
|
run: |
|
|
zip_url=$(python3 -c 'from pathlib import Path; import re; print(re.search(r"from \"(https://cdn.jsdelivr.net/[^\"]+)\"", Path("demo/web/archive.mjs").read_text(encoding="utf-8")).group(1))')
|
|
curl -fsSL "$zip_url" -o "$RUNNER_TEMP/zip.mjs"
|
|
ANYPS5_TEST_ZIP_URL="$zip_url" ANYPS5_TEST_ZIP_PATH="$(python3 -c 'from pathlib import Path; import sys; print(Path(sys.argv[1]).resolve().as_uri())' "$RUNNER_TEMP/zip.mjs")" node demo/web/tests/archive-root.test.mjs demo/web
|
|
- name: Check browser module syntax
|
|
run: |
|
|
node --check demo/web/app.mjs
|
|
node --check demo/web/archive.mjs
|
|
node --check demo/web/batch.mjs
|
|
node --check demo/web/failure-report.mjs
|
|
node --check demo/web/output-directory.mjs
|
|
node --check demo/web/worker.mjs
|
|
- name: Test browser converter helpers
|
|
run: node --test demo/web/tests/app.test.mjs demo/web/tests/batch.test.mjs demo/web/tests/failure-report.test.mjs demo/web/tests/output-directory.test.mjs
|