Skip to content

Conversation

@timurcarstensen
Copy link
Collaborator

Summary

This PR adds GitHub Actions workflows to enforce code quality standards across the project.

Changes

  • Main CI workflow (.github/workflows/ci.yml)

    • Runs on pushes to main and pull requests
    • Tests against Python 3.8, 3.9, 3.10, and 3.11
    • Uses Ruff for both code formatting and linting
    • Includes YAML linting with yamllint
    • Includes shell script linting with ShellCheck
    • Type checking with mypy (non-blocking for now)
  • Pre-commit workflow (.github/workflows/pre-commit.yml)

    • Automatically runs pre-commit hooks on pull requests
    • Ensures consistent code style before merging
  • Ruff configuration in pyproject.toml

    • Line length set to 88 characters
    • Configured with common linting rules (pycodestyle, pyflakes, isort, etc.)
    • Consistent formatting preferences
  • Pre-commit configuration (.pre-commit-config.yaml)

    • Standard file checks (trailing whitespace, EOF, large files, etc.)
    • Ruff for automatic fixing of linting issues
    • Mypy for type checking

Benefits

  • Consistent code formatting across all contributions
  • Early detection of common code issues
  • Automated import sorting
  • Type safety checks
  • Protection against common file issues (large files, merge conflicts, etc.)

Testing

The workflows will run automatically once this PR is merged. Contributors can also run pre-commit install locally to get instant feedback before pushing.

- Add main CI workflow with Ruff for formatting and linting
- Add pre-commit workflow for automated checks
- Configure Ruff in pyproject.toml for consistent code style
- Add .pre-commit-config.yaml for local pre-commit hooks
- Include YAML and shell script linting
- Support Python 3.8-3.11 in CI matrix
- Remove matrix strategy, use single Python 3.12 version
- Update all workflows to use Python 3.12 consistently
- Replace pip with uv for all dependency installations
- Use uv venv and uv run for consistent environment management
- Significant speed improvements expected in CI runs
- Replace uv venv/pip install with uvx for direct tool execution
- Eliminates unnecessary virtual environment creation
- Faster CI runs by avoiding full dependency installation
- Uses uvx ruff, uvx mypy, uvx yamllint directly
@timurcarstensen timurcarstensen merged commit a98a34b into main Aug 1, 2025
2 checks passed
@timurcarstensen timurcarstensen deleted the add-github-actions-ci branch August 1, 2025 16:22
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.

2 participants