Skip to content

ci: run the template tests on GitHub Actions - #17

Merged
astrojuanlu merged 1 commit into
mainfrom
enable-template-ci
Oct 22, 2026
Merged

astrojuanlu merged 1 commit into
mainfrom
enable-template-ci

Conversation

@astrojuanlu

Copy link
Copy Markdown
Contributor

What

The template ships a pytest suite (pytest-copie, 28 tests) that was
only ever run locally. This PR enables it on CI:

  • New .github/workflows/test.yaml: on every PR touching
    copier.yaml/template/**/tests/**/pyproject.toml, and on
    pushes to main - runs ruff check + ruff format --check + pytest.
  • Fixed the two tests that had drifted from the pin design (they still
    asserted the old secret version question):
    • test_initial_source_tag_* replaces test_source_tag_is_derived_from_version
      and test_version_is_used_verbatim/_not_recorded_in_answers
    • the answers-file test now asserts initial_source_tag is recorded

Verified

  • uv run pytest tests/ → 28 passed
  • ruff check . + ruff format --check . → clean

Assisted-by: OpenRouter:z-ai/glm-5.3-flash pi

The template ships a pytest suite (pytest-copie) that was only run
locally; two tests had drifted from the pin design and failed:

- source-tag is seeded by the initial_source_tag answer (recorded), not
  derived from an ephemeral secret version question
- the answers file records initial_source_tag

Update those to the current design and add a workflow: ruff check +
format on the repo and pytest on every PR touching template files and
on pushes to main.

Assisted-by: OpenRouter:z-ai/glm-5.3-flash pi
@astrojuanlu
astrojuanlu merged commit 3475708 into main Oct 22, 2026
1 check passed
@astrojuanlu
astrojuanlu deleted the enable-template-ci branch October 22, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant