Files
lark-channel-molecule/.gitea/workflows/ci.yml
T

38 lines
1.1 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, not public PyPI — same PIP_INDEX_URL pattern as
# molecule-ai-workspace-runtime's own ci.yml. The Gitea "simple"
# index proxies public PyPI for everything else (lark-oapi, qrcode).
PIP_INDEX_URL: https://git.moleculesai.app/api/packages/molecule-ai/pypi/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