Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor logic to support Pydantic'sField() function in dataclasses#5561

Refactor logic to support Pydantic'sField() function in dataclasses

Refactor logic to support Pydantic'sField() function in dataclasses #5561

Workflow file for this run

name:codspeed
on:
push:
branches:
-main
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
env:
UV_FROZEN:true
jobs:
codspeed-profiling:
name:CodSpeed profiling
runs-on:ubuntu-24.04
steps:
-uses:actions/checkout@v4
-uses:astral-sh/setup-uv@v6
# Using this action is still necessary for CodSpeed to work:
-uses:actions/setup-python@v5
with:
python-version:"3.12"
-id:core-version
name:resolve pydantic-core tag
run:|
set -uex -o pipefail
echo core-ref=$(python -c "
import re
import tomllib
pyproject_toml = tomllib.loads(open('pyproject.toml').read())
core = next(d for d in pyproject_toml['project']['dependencies'] if d.startswith('pydantic-core'))
if (result := re.search(r'==(.+)', core)) is not None:
print(f'v{result.group(1)}')
elif (result := re.search(r'@ git\+https://github\.com/pydantic/pydantic-core\.git@(.+)', core)) is not None:
print(result.group(1))
else:
raise RuntimeError('Could not resolve pydantic-core ref')
") >> $GITHUB_OUTPUT
-name:install deps
run:uv sync --python 3.12 --group testing-extra --extra email --frozen
-name:checkout pydantic-core
uses:actions/checkout@v4
with:
repository:pydantic/pydantic-core
ref:${{ steps.core-version.outputs.core-ref }}
path:pydantic-core
-name:install rust stable
uses:dtolnay/rust-toolchain@stable
with:
components:llvm-tools
-name:cache rust
uses:Swatinem/rust-cache@v2
with:
workspaces:pydantic-core
-name:install pydantic-core with profiling symbols
run:|
cd pydantic-core
ln -s ../.venv .venv
uv sync --group all --inexact
uv pip uninstall pytest-speed
uv run make build-pgo
env:
CARGO_PROFILE_RELEASE_DEBUG:"line-tables-only"
CARGO_PROFILE_RELEASE_STRIP:"false"
-name:Run CodSpeed benchmarks
uses:CodSpeedHQ/action@v3
with:
run:uv run --no-sync pytest ./tests/benchmarks --codspeed

[8]ページ先頭

©2009-2025 Movatter.jp