mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
👷 增加pyd1兼容测试
This commit is contained in:
parent
2a49effbba
commit
cc8c39f4d1
61
.github/workflows/pyd1-compat.yml
vendored
Normal file
61
.github/workflows/pyd1-compat.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
name: pydantic1-compat-test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- next
|
||||||
|
paths:
|
||||||
|
- admin-frontend/**
|
||||||
|
- docker/**
|
||||||
|
- nonebot_bison/**
|
||||||
|
- tests/**
|
||||||
|
- pyproject.toml
|
||||||
|
- poetry.lock
|
||||||
|
- docker.env.prod
|
||||||
|
- .github/**
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- admin-frontend/**
|
||||||
|
- docker/**
|
||||||
|
- nonebot_bison/**
|
||||||
|
- tests/**
|
||||||
|
- pyproject.toml
|
||||||
|
- poetry.lock
|
||||||
|
- docker.env.prod
|
||||||
|
- .github/**
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: pydantic1 test
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.11"]
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
fail-fast: false
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
PYTHON_VERSION: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Python environment
|
||||||
|
uses: ./.github/actions/setup-python
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install prerequisites
|
||||||
|
run: poetry add pydantic@^1.10 && poetry install
|
||||||
|
|
||||||
|
- name: Run Pytest
|
||||||
|
run: poetry run pytest -n auto
|
@ -102,7 +102,7 @@ target-version = "py310"
|
|||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 120
|
line-length = 120
|
||||||
preview = true
|
preview = true
|
||||||
target-version = ["py310", "py311"]
|
target-version = ["py310", "py311", "py312"]
|
||||||
include = '\.pyi?$'
|
include = '\.pyi?$'
|
||||||
extend-exclude = '''
|
extend-exclude = '''
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user