Merge pull request #1209 from feder-cr/docs/audit-fixes #916
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: tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # This repository is public and everything in it is English by rule. The gate | |
| # is a COPY and not a reference to the one in the sibling packages, on purpose: | |
| # it scans the tree it is run from, and running a sibling's copy from here | |
| # silently scans the wrong repository and reports clean. That happened once | |
| # already, which is why each package carries its own. | |
| english: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: the repository is English | |
| run: | | |
| python scripts/check_english_only.py --selftest | |
| python scripts/check_english_only.py | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: install and test | |
| # The default selection excludes `ui`, which drives a real browser: those | |
| # need an engine download and a machine doing nothing else, and a runner | |
| # is neither. They are run by hand, serially, before a release. | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[test]" | |
| python -m pytest -q | |
| # This package is published, so the thing that must work is the WHEEL, not the | |
| # checkout. An editable install can pass every test while the built artifact is | |
| # missing a module: the tests import from src/ either way, and only a clean | |
| # install from the wheel can tell the difference. | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: the wheel builds, installs clean, and answers | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| python -m build --wheel | |
| python -m venv /tmp/clean | |
| /tmp/clean/bin/pip install dist/*.whl | |
| /tmp/clean/bin/aihawk --help | |
| /tmp/clean/bin/python -c "import aihawk.web, aihawk.brain, aihawk.link, aihawk.cli" |