Refactor and enhance various components and backend features
- Update .gitignore to prevent tracking of local directories and accidental files. - Improve installation instructions in INSTALLATION.md for faster dependency resolution using `uv`. - Replace regex-based string replacement with safer `replaceAll` in i18n.js to mitigate ReDoS risks. - Add documentation for global state key registry in runtimeState.js. - Prevent timer leaks in toast.js by stopping the cleaner timer when no active toasts remain. - Use replaceChildren instead of innerHTML for safer DOM manipulation in Viewer_impl.js. - Update FloatingViewer.js to improve icon handling and enhance generation time display. - Implement JSON sanitization for NaN/Infinity values in utils.py to ensure valid JSON output. - Adjust mypy configuration to target Python 3.10. - Update requirements.txt to specify compatible versions for pywin32. - Add comprehensive tests for environment variable helpers in test_config.py.
This commit is contained in:
@@ -48,6 +48,25 @@ jobs:
|
||||
- name: Audit JS dependencies
|
||||
run: npm audit --audit-level=high
|
||||
|
||||
js-test:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: npm ci --ignore-scripts
|
||||
|
||||
- name: Run JS tests (vitest)
|
||||
run: npm run test:js
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
@@ -55,7 +74,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10", "3.12", "3.13", "3.14"]
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
@@ -80,10 +99,18 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pytest pytest-asyncio
|
||||
pip install pytest pytest-asyncio pytest-cov
|
||||
|
||||
- name: Run pytest
|
||||
run: python -m pytest -q
|
||||
run: python -m pytest -q --cov=mjr_am_backend --cov=mjr_am_shared --cov-report=xml --cov-report=term-missing:skip-covered
|
||||
|
||||
- name: Upload coverage report
|
||||
if: matrix.python-version == '3.12'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-xml
|
||||
path: coverage.xml
|
||||
retention-days: 14
|
||||
|
||||
typecheck:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
Reference in New Issue
Block a user