Skip to content

test: verify Copier template lifecycle - #24

Merged
mjun0812 merged 1 commit into
mainfrom
test/template-lifecycle
Sep 3, 2026
Merged

test: verify Copier template lifecycle#24
mjun0812 merged 1 commit into
mainfrom
test/template-lifecycle

Conversation

@mjun0812

Copy link
Copy Markdown
Owner

Overview and Background

Add a dedicated CI job that validates the generated project's full Copier lifecycle. The existing matrix verifies a fresh copy and its development checks, but it did not prove that a project produced by an older template revision can update to the current revision or that the resulting package builds.

Related Issues

None.

Implementation Approach

Generate the fixture from the immutable v1.0.0 tag, commit it as a Git repository as required by Copier updates, then update it using the current HEAD. The job asserts both a generated diff and a changed recorded template revision before building the package. This uses the actual historical-to-current Copier path instead of duplicating the fresh-copy matrix.

Changes

  • Add an isolated Template lifecycle CI job with complete Git history so the historical tag is available.
  • Update the historical generated project with Copier and fail if the update makes no changes or leaves the old revision recorded.
  • Build the updated package and verify both sdist and wheel artifacts.
  • Deduplicate shared Action-version matches before comparing them with the generated-project workflow.

Impact

CI gains one lifecycle job. Generated project contents, template behavior, compatibility, security, and deployment behavior are unchanged.

Validation Results

actionlint .github/workflows/test.yml

Passed.

uvx copier copy --vcs-ref v1.0.0 ./ /private/tmp/project --defaults \
-d project_name=lifecycle-project -d python_version=3.13 \
-d package_name=lifecycle_package -d description="Lifecycle test" \
-d author_name="Lifecycle Tester" -d author_email=lifecycle@example.com
git -C /private/tmp/project init
git -C /private/tmp/project add .
git -C /private/tmp/project commit -m "chore: initialize generated project"
uvx copier update --vcs-ref HEAD --defaults /private/tmp/project
uv build --directory /private/tmp/project

Passed: Copier updated the project from v1.0.0 to the current revision, produced a non-empty project diff, and built lifecycle_project-0.0.1.tar.gz plus lifecycle_project-0.0.1-py3-none-any.whl.

- Generate a project from the v1.0.0 template revision
- Update the generated Git repository to the current template revision
- Build and verify source and wheel distributions after the update
@mjun0812mjun0812 self-assigned this Sep 2, 2026

@mjun0812mjun0812 left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex PR Review

Summary

This pull request adds CI coverage for updating a project generated from v1.0.0 to the current template and building its distributions. No blocking findings were confirmed. The Contract axis was skipped because no spec source was available.

Verdict

APPROVE

Findings

N/A


Reviewed by Codex at 42177d8

@mjun0812
mjun0812 merged commit 353fa7f into mainSep 3, 2026
7 checks passed
Sign up for freeto 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

@mjun0812