docs: real repository URLs and published GHCR image #2
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
| name: CI | |
| # Runs the project's existing self-contained test suites — no live server, | |
| # no API keys, no network calls to an LLM. Compatible with both GitHub | |
| # Actions and Gitea Actions (same workflow syntax). | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # actions/setup-python only ships prebuilt interpreters for GitHub's | |
| # hosted Ubuntu images; in a minimal Gitea job container it fails with | |
| # "version '3.11' ... was not found for this operating system". Use the | |
| # platform's own Python instead: already present on GitHub runners, | |
| # apt-installed in the container otherwise. Both paths give Python 3.11. | |
| - name: Set up Python | |
| run: | | |
| if ! command -v python3 >/dev/null 2>&1; then | |
| apt-get update && apt-get install -y --no-install-recommends python3 python3-pip | |
| fi | |
| # node:*-bookworm ships python3 but no pip module — ensure pip too. | |
| if ! python3 -m pip --version >/dev/null 2>&1; then | |
| if command -v apt-get >/dev/null 2>&1; then | |
| apt-get update && apt-get install -y --no-install-recommends python3-pip | |
| else | |
| python3 -m ensurepip --upgrade | |
| fi | |
| fi | |
| python3 --version && python3 -m pip --version | |
| - name: Install dependencies | |
| # Debian's system Python is PEP 668 "externally managed"; the flag is | |
| # safe in this ephemeral CI env and is supported by modern pip on both. | |
| run: python3 -m pip install --break-system-packages -r requirements.txt | |
| - run: python3 -m py_compile server.py translator.py cache.py | |
| - run: python3 test_translation.py | |
| frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - run: node -c static/translator.js | |
| - run: node -c static/loader.js | |
| - run: npm install | |
| - run: npm test |