Skip to content

Add reusable lint and changelog workflows#1

Merged
MaxGhenis merged 1 commit intomainfrom
reusable-workflows
Mar 7, 2026
Merged

Add reusable lint and changelog workflows#1
MaxGhenis merged 1 commit intomainfrom
reusable-workflows

Conversation

@MaxGhenis
Copy link
Contributor

Summary

  • Adds two reusable GitHub Actions workflows to the org-level .github repo
  • lint.yml: Runs uvx ruff format --check . (standardizes the lint step used across 10+ repos)
  • changelog.yml: Checks for a changelog fragment in changelog.d/ (identical logic currently copy-pasted across 10+ repos)

Usage

Any PolicyEngine repo can replace its inline lint/changelog jobs with:

jobs:
  Lint:
    uses: PolicyEngine/.github/.github/workflows/lint.yml@main
  check-changelog:
    uses: PolicyEngine/.github/.github/workflows/changelog.yml@main

Survey of current patterns

The following repos all have essentially the same lint and changelog steps, with minor variations in how ruff is installed:

Repo Has lint? Has changelog check?
policyengine-core uvx ruff format --check . Yes
policyengine-us uv run ruff format --check . Yes
policyengine-uk uvx ruff format --check . No (should add)
policyengine-canada pip install ruff && ruff format --check . Yes
policyengine-il pip install ruff && ruff format --check . Yes
policyengine-ng pip install ruff && ruff format --check . Yes
policyengine-sg None Yes
policyengine-nz uv run ruff format --check . Yes
policyengine-us-data pip install ruff && ruff format --check . (reusable) Yes
policyengine-uk-data N/A Yes
microdf N/A Yes
L0 black (outdated) N/A

Test plan

  • Merge this PR
  • Create follow-up PRs on 2-3 repos (policyengine-il, policyengine-ng) to use these reusable workflows
  • Verify CI passes on those repos

Generated with Claude Code

These reusable workflows standardize the two most common CI steps
across PolicyEngine Python repos:

- lint.yml: runs `uvx ruff format --check .`
- changelog.yml: checks for a changelog fragment in changelog.d/

Repos can call these with:
  uses: PolicyEngine/.github/.github/workflows/lint.yml@main
  uses: PolicyEngine/.github/.github/workflows/changelog.yml@main

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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