Add CI/CD pipeline with pytest, ruff, and pyright #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added a comprehensive CI/CD pipeline using GitHub Actions that automatically runs tests, linting, and type checking on every pull request. This ensures code quality and prevents broken code from being merged into
main.What's Included
🔄 GitHub Actions Workflow
Created
.github/workflows/ci.ymlwith four jobs:1. Tests (pytest)
2. Lint (ruff)
ruff checkandruff format --check3. Type Check (pyright)
abstra_json_sqlpackage4. All Checks Passed
📦 Configuration Files
requirements-dev.txtruff.tomlpyrightconfig.jsonabstra_json_sqlpackageBenefits
🛡️ Quality Assurance
🚀 Developer Experience
🔒 Integration with Branch Protection
These checks are designed to work seamlessly with GitHub's branch protection rules. When the PR is merged and branch protection is updated to require status checks, future PRs will be blocked from merging until:
📊 Status Badges (Optional)
After this PR is merged, you can add status badges to your README:
Testing
All checks were tested locally before creating this PR:
Next Steps
After merging this PR, you can update branch protection rules to require these checks:
# Via GitHub CLI (already done in previous PR) gh api repos/abstra-app/json-sql/branches/main/protection -X PUT \ --field required_status_checks[strict]=true \ --field required_status_checks[contexts][]=test \ --field required_status_checks[contexts][]=lint \ --field required_status_checks[contexts][]=typecheckOr via GitHub UI:
mainbranch ruletest,lint,typecheck,all-checks-passedFiles Changed
.github/workflows/ci.yml- Main CI/CD workflowrequirements-dev.txt- Development dependenciesruff.toml- Ruff linter/formatter configurationpyrightconfig.json- Pyright type checker configuration🤖 Generated with Claude Code