-
-
Notifications
You must be signed in to change notification settings - Fork 1
ADFA-4739: Kotlin docs DB pipeline + Build Kotlin Docs GitHub Action #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a4795f1
3b128c0
e5ff684
cd59353
ae44822
5984357
1f7edd4
9b4ba07
421e529
66da59d
1cf41d2
26cb831
26c6250
09ca170
97755b1
2827bfb
b203500
b09331f
b5084b5
7970cdd
dda6410
801f5eb
358276d
0599a37
838ac44
4d4f37d
4b19f14
25d284f
5a00e22
7499935
8ace4f4
80e234a
06a43f5
d9df0f0
e6786a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Python tests | ||
|
|
||
| # Runs the repo's pytest suites on every push and PR. | ||
| # | ||
| # Added because nothing here executed them: the Kotlin-docs pipeline ships | ||
| # ~1,300 lines of regression tests covering permanent, silent data-loss paths | ||
| # (a migration deleting an unrelated page, an image optimizer collapsing two | ||
| # sources onto one output, a chunk chain reassembling truncated), and until now | ||
| # they only ran when someone remembered to run them locally. Tests that never | ||
| # run in CI rot, and these are exactly the ones whose failure is invisible | ||
| # without them. | ||
| # | ||
| # The suites are separate because their dependencies are: docdb-studio and | ||
| # check-tools each own a pyproject.toml + uv.lock, while ProcessKotlinWebsiteJSON | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. F14 · Medium — this header explains a three-way split, but only two suites actually run The comment reads "docdb-studio and check-tools each own a pyproject.toml + uv.lock, while ProcessKotlinWebsiteJSON runs against the root requirements.txt", and the workflow's stated purpose is "Runs the repo's pytest suites on every push and PR". There are three suites' worth of tests in the repo and only two are executed.
|
||
| # runs against the root requirements.txt. | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: python-tests-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| pytest: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update -y | ||
| # pngquant: optimize_media.py shells out to it, and its tests exercise | ||
| # the real binary rather than mocking it. | ||
| # brotli: the CLI, not the Python package - DictionaryCompressor uses | ||
| # it because no Python binding exposes a custom dictionary. | ||
| # zstd: train_dictionary uses `zstd --train-fastcover` to build the | ||
| # shared dictionary the migration tests need. | ||
| sudo apt-get install -y pngquant brotli zstd | ||
|
|
||
| - name: Install Python dependencies | ||
| run: | | ||
| pip install -r requirements.txt pytest | ||
|
|
||
| - name: 'ProcessKotlinWebsiteJSON + sync_kotlin_stdlib_docs' | ||
| run: | | ||
| python -m pytest \ | ||
| ProcessDocs/ProcessKotlinDocs/ProcessKotlinWebsiteJSON \ | ||
| scripts/sync_kotlin_stdlib_docs \ | ||
| -q | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
|
|
||
| - name: docdb-studio | ||
| working-directory: docdb-studio | ||
| run: uv run --frozen -- python -m pytest -q | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F12 · Medium —
pipin CI against the repo'suvconvention, plus a dead installTwo things:
pipusage. The convention for this project isuvfor Python dependency management — neverpip,pip3, or theuv pipshim. This PR touches three such steps and leaves them all onpip:build-kotlin-docs.yaml:203/208,build-kotlin-docs-local.yaml:218/221, andpython-tests.yaml:56.uvis already wired up in this repo —python-tests.yamlinstalls it for the docdb-studio job — and the ProcessKotlinWebsiteJSON README documentsuv run --with-requirements ...as the supported invocation.Dead install + wrong comment. The edited comment says "markdown-it-py: ProcessKotlinWebsiteJSON's own requirement (see its README); scour/cairosvg are in requirements.txt already" — but
markdown-it-py>=2.0is inrequirements.txton main and was installed by the preceding line all along. The extrapip install markdown-it-pyis dead work and the comment's premise is wrong.