Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# get all branches
fetch-depth: 0

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
Expand All @@ -33,7 +36,7 @@ jobs:

- name: Run pre-commit
run: |
pre-commit install
commitlint --from origin/${{ github.event.pull_request.base.ref }} --to HEAD
pre-commit run --all-files

tests:
Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,46 @@ repos:
entry: bash -c "cd python_coderunner && ruff check ."
language: system
types: [python]
stages: [pre-commit]
verbose: true

- id: ruff_format
name: ruff_format
# not in args, because entry is bash
entry: bash -c "cd python_coderunner && ruff format --quiet ."
language: system
types: [python]
stages: [pre-commit]
verbose: true

- id: isort
name: isort
entry: bash -c "cd python_coderunner && isort ."
language: system
types: [python]
stages: [pre-commit]
verbose: true

- id: mypy
name: mypy
entry: bash -c "cd python_coderunner && mypy ."
language: system
types: [python]
stages: [pre-commit]
verbose: true

- id: pylint
name: pylint
entry: bash -c "cd python_coderunner && pylint ."
language: system
types: [python]
stages: [pre-commit]
verbose: true

- id: commitlint
name: commitlint
entry: commitlint
args: [--file]
language: system
stages: [commit-msg]
verbose: true
1 change: 1 addition & 0 deletions python_coderunner/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ requires-python = ">=3.10"

[dependency-groups]
dev = [
"commitlint>=1.3.0",
"isort>=4.3.21",
"mypy>=0.910",
"pre-commit>=1.21.0",
Expand Down
Loading
Loading