Skip to content

fix(generator): lint-clean Python template, check all app templates in CI - #101

Merged
andiikaa merged 3 commits into
mainfrom
ci/template-checks
Nov 24, 2026
Merged

andiikaa merged 3 commits into
mainfrom
ci/template-checks

Conversation

@andiikaa

Copy link
Copy Markdown
Member

CI never built the app templates apart from the default Python app in the e2e test, so the Next.js template's own pnpm lint failed unnoticed (#99).

New workflow Templates (.github/workflows/templates.yml)

One matrix job per generator: generate an app with the CLI of this commit, run the checks a developer of that app would run, then docker build its image the way nova app install does.

template checks
nextjs_app pnpm install --frozen-lockfile, lint, tsc, knip, build (pnpm 10.24.0 like the Dockerfile; pnpm fetches the Node version from pnpm-workspace.yaml)
python_app uv sync, ruff check, ruff format --check
golang_app go build, go vet, gofmt (Go version from the generated go.mod)
rust_app cargo build --locked, clippy -D warnings, cargo fmt --check (toolchain read from the template's Dockerfile)

Runs on PRs that touch pkg/generator/** or the workflow, on main, weekly (Monday 04:17 UTC) and manually. The weekly run is there because the templates' dependencies move without a change here: version ranges, and the Python template has no lockfile. fail-fast: false, and the image builds use the GitHub Actions cache per template.

Python template

Two findings of its own linter, fixed:

  • app/register_programs.py: import grouping (ruff I001).
  • app/programs/start_here.py: the trailing comment made a line too long for ruff format, so the comment moved above the line.

Verified locally

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

andiikaa added a commit that referenced this pull request Nov 24, 2026
…go test, wider triggers

Review of #101:
- no buildx cache: ~1.5 GB of Actions cache per PR, slower to export than
  to rebuild, and it kept the weekly run from resolving dependencies anew
- python: uv sync with the image's Python (was the runner's 3.14), import
  the app to catch NOVA SDK API changes ruff can't see
- rust: cargo test (the README asks for it); clear error if the Dockerfile
  names no rust:<version>
- triggers: also pkg/appenv and pkg/cmd/app.go on PRs, every push to main
- concurrency like ci.yml, so queued main/scheduled runs aren't cancelled
- the app's setup-go caches the app's modules
andiikaa added a commit that referenced this pull request Nov 24, 2026
…go test, wider triggers

Review of #101:
- no buildx cache: ~1.5 GB of Actions cache per PR, slower to export than
  to rebuild, and it kept the weekly run from resolving dependencies anew
- python: uv sync with the image's Python (was the runner's 3.14), import
  the app to catch NOVA SDK API changes ruff can't see
- rust: cargo test (the README asks for it); clear error if the Dockerfile
  names no rust:<version>
- triggers: also pkg/appenv and pkg/cmd/app.go on PRs, every push to main
- concurrency like ci.yml, so queued main/scheduled runs aren't cancelled
- the app's setup-go caches the app's modules
… and weekly

The e2e test only builds the default python app, so template breakage
went unnoticed (the Next.js template's own lint has been failing). The
Templates workflow generates an app from each template with the CLI of
the commit, runs the checks a developer of that app would run and
builds its image like 'nova app install':
- nextjs: pnpm install (frozen), lint, tsc, knip, build
- python: uv sync, ruff check, ruff format --check
- golang: go build, go vet, gofmt
- rust: cargo build --locked, clippy -D warnings, fmt (toolchain of the
  Dockerfile)
It runs on PRs touching pkg/generator, on main and weekly (dependency
ranges, no Python lockfile).

Fixes the two findings in the python template: import grouping
(ruff I001) and a line ruff format would split.
…go test, wider triggers

Review of #101:
- no buildx cache: ~1.5 GB of Actions cache per PR, slower to export than
  to rebuild, and it kept the weekly run from resolving dependencies anew
- python: uv sync with the image's Python (was the runner's 3.14), import
  the app to catch NOVA SDK API changes ruff can't see
- rust: cargo test (the README asks for it); clear error if the Dockerfile
  names no rust:<version>
- triggers: also pkg/appenv and pkg/cmd/app.go on PRs, every push to main
- concurrency like ci.yml, so queued main/scheduled runs aren't cancelled
- the app's setup-go caches the app's modules
@andiikaa
andiikaa merged commit 7f4229c into main Nov 24, 2026
24 checks passed
@andiikaa
andiikaa deleted the ci/template-checks branch November 24, 2026 15:39
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