-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Update pre-commit workflow, remove Python 3.14 check (#30)
* 更新 pre-commit 工作流,移除 Python 3.14 版本支持
- Loading branch information
Showing
10 changed files
with
400 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Pre-commit checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10', '3.11', '3.12', '3.13'] # 添加你想要测试的 Python 版本 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} # 使用矩阵中的 Python 版本 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install pdm | ||
python -m pip install pre-commit | ||
pdm config python.use_venv false | ||
pdm install --no-lock | ||
pre-commit install | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ pydeps.png | |
.pdm-python | ||
.pdm-build | ||
.pdm.toml | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
fail_fast: true | ||
repos: | ||
# - repo: local | ||
# hooks: | ||
# - id: check-filenames | ||
# name: Check Python Filenames | ||
# entry: python ./.pre-commit/check_filename.py | ||
# language: python | ||
# files: \.py$ | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
args: [--config=./pyproject.toml] | ||
|
||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.14.0 | ||
hooks: | ||
- id: mypy | ||
args: ["--config-file=./pyproject.toml"] | ||
exclude: '^(tests/|scripts/|docs/)' | ||
|
||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.