Skip to content

Commit 448abd1

Browse files
authored
ci: Add BasedPyright workflow and extend test matrix to Python 3.14. (#30)
1 parent 075dcc7 commit 448abd1

File tree

3 files changed

+1200
-829
lines changed

3 files changed

+1200
-829
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
paths:
99
- "src/**"
1010
- "tests/**"
11+
- "github/workflows/**"
1112
- "pyproject.toml"
1213
- "uv.lock"
1314

@@ -18,6 +19,25 @@ jobs:
1819
- uses: actions/checkout@v6
1920
- uses: crate-ci/typos@master
2021

22+
basedpyright:
23+
name: BasedPyright
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- name: Setup uv
29+
uses: astral-sh/setup-uv@v7
30+
with:
31+
enable-cache: true
32+
python-version: 3.12
33+
version: "latest"
34+
35+
- name: Install Dependencies
36+
run: uv sync --locked
37+
38+
- name: Static typing check
39+
run: uvx basedpyright
40+
2141
test:
2242
name: Coverage
2343
# runs-on: ${{ matrix.os }}
@@ -33,7 +53,7 @@ jobs:
3353
strategy:
3454
fail-fast: false
3555
matrix:
36-
python-version: ["3.10", "3.11", "3.12", "3.13"]
56+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3757
# os: [ubuntu-latest, windows-latest, macos-latest]
3858
# pydantic-version: ["v1", "v2"]
3959

@@ -45,14 +65,14 @@ jobs:
4565
steps:
4666
- uses: actions/checkout@v6
4767

48-
- name: Install uv and set the python version
68+
- name: Setup uv
4969
uses: astral-sh/setup-uv@v7
5070
with:
5171
enable-cache: true
5272
python-version: ${{ matrix.python-version }}
5373
version: "latest"
5474

55-
- name: Install Dependencies for test group
75+
- name: Install Dependencies with test group
5676
run: uv sync --no-dev --locked
5777

5878
- name: Run Pytest

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ readme = "README.md"
66
requires-python = ">=3.10"
77
authors = [{ name = "owner", email = "[email protected]" }]
88
dependencies = [
9-
# "nonebot-adapter-onebot>=2.4.6,<3.0.0"
109
"httpx>=0.27.0,<1.0.0",
1110
"nonebot-plugin-alconna>=0.60.0,<1.0.0", # 跨平台命令解析拓展
1211
"nonebot-plugin-apscheduler>=0.5.0,<1.0.0", # 定时任务
@@ -25,7 +24,7 @@ dev = [
2524
"bump-my-version>=1.2.4",
2625
"nonebot2[fastapi]>=2.4.2,<3.0.0",
2726
"poethepoet>=0.36.0",
28-
"ruff>=0.14.3,<1.0.0",
27+
"ruff>=0.14.5,<1.0.0",
2928
]
3029
test = [
3130
"nonebot-adapter-onebot>=2.4.6,<3.0.0",
@@ -88,7 +87,6 @@ addopts = [
8887
"--tb=short", # 简短的错误回溯
8988
"-ra", # 显示所有测试结果摘要
9089
"--strict-markers", # 严格标记模式
91-
# "--doctest-modules", # 运行文档测试
9290
"--import-mode=prepend", # 导入模式
9391
]
9492
pythonpath = ["src"]

0 commit comments

Comments
 (0)