Skip to content

CI skips the server tests that read docs/deploy.md and docs/build.md when a commit changes only those documents #159

Closed

Description

@lumenpearson

What is broken.
.github/workflows/ci.yml picks which jobs run from the changed paths. The server job runs for server/*|api/*|requirements.txt|.github/workflows/* and for nothing else. Four server tests, all already on main, read documents outside those paths and fail when a document drifts from the code:

  • test_database_url.py and test_deployment_config.py read docs/deploy.md.
  • test_roles.py reads docs/deploy.md.
  • test_env_example.py reads docs/deploy.md and docs/build.md.

A commit that touches only one of those documents sets neither output. Both jobs are skipped by their if:, and the workflow is green with none of those tests having run. docs/app/ had exactly this problem once, and the Android case carries a comment about it.

The failure scenario.

  1. A pull request edits only docs/deploy.md. It removes a row from the settings table that test_deployment_config.py compares against app/config.py, or it rewrites the postgresql+asyncpg:// line that test_database_url.py checks.
  2. The «What changed» job sets server=false and android=false.
  3. CI is green, and the pull request merges.
  4. The next pull request that touches server/ fails on a document it never changed.

The same gap, widened by PR #140 (not yet on main). That branch adds more readers:

  • test_netschool_mapper.py reads docs/diaries/netschool.md.
  • test_region_catalog.py reads docs/diaries.md and docs/diaries/regions.md, and regions.md is the catalog generator's input.
  • On Android, :app bundles docs/legal/ as assets and LegalDocumentsTest reads it.
  • :core:data bundles server/app/catalog/data/regions.json as the phone's allow-list of diary hosts.
  • DiaryProtocolVectorsTest reads server/tests/vectors/diary_protocol.json.

An edit to the last two currently runs only the server job, never the Android one.

Fix. Widen both cases of the filter so that every file a job's tests read triggers that job. Say why in the same style as the existing docs/app/ comment. This lands on PR #140's branch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions