Skip to content

support pydantic v2 & make ruff happy #35

support pydantic v2 & make ruff happy

support pydantic v2 & make ruff happy #35

Workflow file for this run

name: Code Coverage
on:
push:
branches:
- "master"
- "dev"
pull_request:
branches:
- "master"
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
env:
OS: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- uses: pdm-project/setup-pdm@v3
name: Setup PDM
with:
python-version: ${{ matrix.python-version }}
# TODO:修改 cache
# - uses: actions/cache@v2
# with:
# path: ~/.cache/pypoetry/virtualenvs
# key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- run: pdm install
shell: bash
- name: Run tests
run: pdm run pytest -s
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: OS,PYTHON_VERSION