mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-05-12 00:44:42 +00:00
feat(tools): migrate to UV from Poetry for blazing fast ultra safe secure unhackable dependency management 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀
This commit is contained in:
@@ -32,7 +32,7 @@ env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.33.0"
|
||||
|
||||
jobs:
|
||||
@@ -48,18 +48,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
set -euo pipefail
|
||||
poetry run python tests/backend/run_comprehensive_benchmarks.py \
|
||||
uv run python tests/backend/run_comprehensive_benchmarks.py \
|
||||
--json-output bench_results.json 2>&1 | tee bench_results.txt
|
||||
|
||||
- name: Run integrity tests
|
||||
|
||||
@@ -41,7 +41,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -94,18 +94,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
@@ -40,7 +40,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.33.0"
|
||||
COSIGN_VERSION: "3.0.6"
|
||||
# Official .deb from aquasecurity/trivy releases; scripts/ci/setup-trivy.sh verifies
|
||||
@@ -100,18 +100,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -182,18 +182,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -334,18 +334,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -429,10 +429,10 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
@@ -33,7 +33,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -80,10 +80,10 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
+20
-20
@@ -35,7 +35,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -80,18 +80,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -112,20 +112,20 @@ jobs:
|
||||
case "${{ matrix.task.id }}" in
|
||||
lint)
|
||||
pnpm run lint
|
||||
poetry run ruff check .
|
||||
poetry run ruff format --check .
|
||||
uv run ruff check .
|
||||
uv run ruff format --check .
|
||||
;;
|
||||
frontend-tests)
|
||||
pnpm exec vitest run --exclude tests/frontend/LoadTimePerformance.test.js --exclude tests/frontend/i18n.test.js
|
||||
pnpm exec vitest run --config vitest.electron.config.js
|
||||
;;
|
||||
backend-tests)
|
||||
poetry run python -m pytest tests/backend -n auto \
|
||||
uv run python -m pytest tests/backend -n auto \
|
||||
--cov=meshchatx/src/backend
|
||||
;;
|
||||
lang-tests)
|
||||
pnpm exec vitest run tests/frontend/i18n.test.js
|
||||
poetry run python -m pytest tests/backend/test_translator_handler.py
|
||||
uv run python -m pytest tests/backend/test_translator_handler.py
|
||||
;;
|
||||
*)
|
||||
echo "Unknown matrix task: ${{ matrix.task.id }}" >&2
|
||||
@@ -152,18 +152,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -192,7 +192,7 @@ jobs:
|
||||
test -d meshchatx/public/reticulum-docs-bundled/current
|
||||
|
||||
- name: Compile backend sources
|
||||
run: poetry run python -m compileall meshchatx/
|
||||
run: uv run python -m compileall meshchatx/
|
||||
|
||||
- name: Build backend (cx_Freeze)
|
||||
run: pnpm run build-backend
|
||||
|
||||
@@ -30,7 +30,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -103,18 +103,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
@@ -30,7 +30,7 @@ env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
COSIGN_VERSION: "3.0.6"
|
||||
# Official .deb; setup-trivy.sh verifies sigstore + SHA256 (see build-release.yml).
|
||||
@@ -51,18 +51,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -79,8 +79,8 @@ jobs:
|
||||
|
||||
- name: pip-audit
|
||||
run: |
|
||||
poetry run pip install --upgrade "pip>=26.0" pip-audit
|
||||
poetry run pip-audit --ignore-vuln CVE-2026-3219
|
||||
uv run pip install --upgrade "pip>=26.0" pip-audit
|
||||
uv run pip-audit --ignore-vuln CVE-2026-3219
|
||||
|
||||
- name: Apt update (for Trivy .deb)
|
||||
run: sh scripts/ci/exec-priv.sh apt-get update -qq
|
||||
|
||||
Reference in New Issue
Block a user