diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c00614..674b458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,9 @@ jobs: # get all branches fetch-depth: 0 + - name: Lint commit messages + uses: wagoid/commitlint-github-action@v5 + - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v5 with: @@ -32,11 +35,10 @@ jobs: - name: Install deps run: | cd python_coderunner - uv pip install --system --group dev --requirements=pyproject.toml + uv pip install --system --group pre-commit --requirements pyproject.toml - name: Run pre-commit run: | - commitlint --from origin/${{ github.base_ref }} --to HEAD pre-commit run --all-files tests: @@ -58,7 +60,7 @@ jobs: - name: Install deps run: | cd python_coderunner - uv pip install --system --group dev --requirements=pyproject.toml + uv pip install --system --group test --requirements pyproject.toml - name: Run tests run: | diff --git a/python_coderunner/pyproject.toml b/python_coderunner/pyproject.toml index cb758fa..019e2f8 100644 --- a/python_coderunner/pyproject.toml +++ b/python_coderunner/pyproject.toml @@ -18,6 +18,18 @@ dev = [ "pytest-mock>=3.5.1", "ruff>=0.12.0", ] +pre-commit = [ + "isort>=4.3.21", + "mypy>=0.910", + "pre-commit>=1.21.0", + "pylint>=2.6.2", + "ruff>=0.12.0", +] +test = [ + "pytest>=6.1.2,<8.0.0", + "pytest-lazy-fixture>=0.6.3", + "pytest-mock>=3.5.1", +] [tool.pytest.ini_options] pythonpath = ["."] # to run without python -m, otherwise there will be no src in the path diff --git a/python_coderunner/uv.lock b/python_coderunner/uv.lock index 5b26152..597eb06 100644 --- a/python_coderunner/uv.lock +++ b/python_coderunner/uv.lock @@ -423,6 +423,18 @@ dev = [ { name = "pytest-mock" }, { name = "ruff" }, ] +pre-commit = [ + { name = "isort" }, + { name = "mypy" }, + { name = "pre-commit" }, + { name = "pylint" }, + { name = "ruff" }, +] +test = [ + { name = "pytest" }, + { name = "pytest-lazy-fixture" }, + { name = "pytest-mock" }, +] [package.metadata] @@ -438,6 +450,18 @@ dev = [ { name = "pytest-mock", specifier = ">=3.5.1" }, { name = "ruff", specifier = ">=0.12.0" }, ] +pre-commit = [ + { name = "isort", specifier = ">=4.3.21" }, + { name = "mypy", specifier = ">=0.910" }, + { name = "pre-commit", specifier = ">=1.21.0" }, + { name = "pylint", specifier = ">=2.6.2" }, + { name = "ruff", specifier = ">=0.12.0" }, +] +test = [ + { name = "pytest", specifier = ">=6.1.2,<8.0.0" }, + { name = "pytest-lazy-fixture", specifier = ">=0.6.3" }, + { name = "pytest-mock", specifier = ">=3.5.1" }, +] [[package]] name = "virtualenv"