Improve scripts for test environment configuration#13939
Merged
Conversation
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
0469de1 to
b410f4b
Compare
The test configuration scripts now include: - Node.js version check (warns if < 18 for Playwright compatibility) - Playwright setup with browser installation and multiplex server dependencies - rsvg-convert checks for SVG to PDF conversion tests - Switch from yarn to npm for consistency between local setup and CI The Playwright setup uses npm install and includes both main Playwright dependencies and multiplex server dependencies required by integration tests
Add section to tests/README.md documenting the optional test dependencies that configure-test-env scripts check for and install: - Java (for veraPDF) - Node.js and npm (for Playwright and MECA validation) - pdftotext (for PDF text extraction) - rsvg-convert (for SVG to PDF conversion) Documents installation instructions for each platform and notes about auto-installation via Scoop on Windows.
Suppress npm deprecation warnings and security audit reports. These flags reduce output noise while preserving actual errors. Audit reports aren't actionable for test-only dependencies.
- Add PowerShell version of run-fast-tests for Windows - Add --keep-outputs/-k flag to run-tests.ps1 (matches bash version from ed683a3) - Document run-fast-tests.sh environment variables with detailed comments - Add comprehensive test environment variables section to README.md Environment variables documented: - QUARTO_TESTS_NO_CONFIG - Skip configure-test-env - QUARTO_TESTS_FORCE_NO_VENV - Skip .venv activation - QUARTO_TEST_KEEP_OUTPUTS - Keep test artifacts (new flag support in PS1) - QUARTO_TEST_VERBOSE - Verbose output - QUARTO_TESTS_NO_CHECK - Legacy/unused variable Changes bring feature parity between bash and PowerShell test runners.
b410f4b to
2b3244f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves test environment configuration and test script usability.
Test Environment Configuration
Running
configurescript for installing dev quarto and thencd tests/andconfigure-test-envshould be all that is needed to configure the test environment or know what is missing.New Optional Dependency Checks
See
tests/README.mdfor complete documentation of optional dependencies.Test Script Improvements
npm Verbosity Reduction
Added
--loglevel=error --no-auditflags to all npm install commands to reduce noise from deprecation warnings and security audit reports during test setup.Windows Test Script Parity
Created
run-fast-tests.ps1for Windows users, matching the existingrun-fast-tests.shfunctionality:.venvfor Python test dependenciesrun-tests.ps1Environment Variable Documentation
Added comprehensive documentation in
tests/README.mdfor all test environment variables:QUARTO_TESTS_NO_CONFIG- Skip configure-test-env scriptsQUARTO_TESTS_FORCE_NO_VENV- Skip .venv activation (bash only)QUARTO_TEST_KEEP_OUTPUTS- Keep test artifacts for debuggingQUARTO_TEST_VERBOSE- Enable verbose test outputQUARTO_TESTS_NO_CHECK- Legacy variable (documented as unused)Keep Outputs Flag Support
Implemented
--keep-outputs/-kflag inrun-tests.ps1for Windows parity with bash version, allowing test artifacts to be preserved for debugging.Bug Fixes
Fixed PowerShell argument passing in
run-tests.ps1when invoked via call operator fromrun-fast-tests.ps1.Other Changes
Replaced yarn by npm to build the quarto-preview.js tool.