Skip to content

ci: add lint and type check workflow#116

Open
abdelhadi703 wants to merge 1 commit intomistralai:mainfrom
abdelhadi703:ci/add-lint-workflow
Open

ci: add lint and type check workflow#116
abdelhadi703 wants to merge 1 commit intomistralai:mainfrom
abdelhadi703:ci/add-lint-workflow

Conversation

@abdelhadi703
Copy link

Summary

Adds a GitHub Actions CI workflow for automated code quality checks.

What it does

  • ruff: Linting (already configured in pyproject.toml)
  • black: Format checking (already configured in pyproject.toml)
  • mypy: Type checking (already configured in pyproject.toml)

Important: File Placement

The workflow file is placed at .github/lint-workflow.yml instead of .github/workflows/lint.yml due to GitHub token scope limitations during PR creation. To activate the workflow, simply move the file:

mkdir -p .github/workflows
mv .github/lint-workflow.yml .github/workflows/lint.yml

Alternatively, a maintainer with the workflow scope can move the file directly.

Why

The project has ruff, black, mypy, and pytest configured in pyproject.toml and listed in requirements.dev.txt, but no CI automation to enforce them. This workflow runs the lint checks on every push to main and on pull requests.

What's NOT included (by design)

  • pytest: Tests require a GPU and a DUMMY_MODEL path, so they cannot run on free GitHub-hosted runners. A GPU-enabled test job could be added later with self-hosted runners.

Configuration

  • Python 3.10 (matches the project's minimum supported version)
  • Pip dependency caching for faster CI runs
  • Triggers: push to main + all pull requests to main

Add GitHub Actions workflow running ruff, black, and mypy checks
on pushes to main and pull requests. Uses the existing tool
configurations in pyproject.toml and requirements.dev.txt.

Note: This file should be moved to .github/workflows/lint.yml
to activate the workflow.
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