Files
lark-channel-molecule/.gitea/workflows/ci.yml
T
hongming 3858b5f7b0
ci / unit-tests (pull_request) Successful in 46s
ci: resolve lark-oapi from public PyPI (Gitea index is not a proxy)
unit-tests fails with 'No matching distribution found for lark-oapi>=1.5.5':
ci.yml set PIP_INDEX_URL to the Gitea registry ONLY, but that registry is a
publish store — it serves the private runtime wheel, not a transparent public
PyPI mirror — so lark-oapi 404s there. lark-oapi>=1.5.5 exists on public PyPI
(1.5.5 .. 1.7.0). Add public PyPI as an EXTRA index; keep Gitea PRIMARY so the
runtime still resolves from our registry. No dependency-confusion surface: the
only Gitea-hosted dep (molecules-workspace-runtime) is 404 on public PyPI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 09:46:34 -07:00

43 lines
1.5 KiB
YAML

name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
cache: pip
- name: Install package + test deps
env:
# molecules-workspace-runtime is published on the org Gitea PyPI
# registry and is 404 on public PyPI (a squat-proof name), so keep the
# Gitea index PRIMARY — the runtime always resolves from our registry.
# The Gitea index is a publish store, NOT a transparent PyPI proxy, so
# everything it does not host (lark-oapi>=1.5.5, qrcode, pytest) 404s
# there; add public PyPI as an EXTRA index for those. No dependency-
# confusion surface: the only Gitea-hosted dep (the runtime) does not
# exist on public PyPI, so the extra index can never shadow it.
PIP_INDEX_URL: https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple/
run: pip install -e ".[qr]" pytest
- name: Byte-compile all modules
run: python -m py_compile lark_channel_molecule/*.py
- name: Run unit tests
# Both sides are mocked (fake ws events + fake platform tools) —
# no creds / network needed, deterministic on a generic runner.
run: pytest -q