Skip to content

Add support for Pydantic V2 #302

Add support for Pydantic V2

Add support for Pydantic V2 #302

Workflow file for this run

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Cancel previous runs on the same PR.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Tests & Linting
jobs:
test:
name: Test Suite
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: -C target-cpu=k8
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install --user -U pip wheel
- run: pip install -r requirements.txt
- run: maturin build --release --strip --manylinux off -i $pythonLocation/python
if: ${{ runner.os != 'Windows' }}
- run: maturin build --release --strip --manylinux off -i $pythonLocation"python.exe"
if: ${{ runner.os == 'Windows' }}
- run: pip install ormsgpack --no-index -f target/wheels
- run: pytest tests/
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings