Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 47 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- '**'
- "**"
pull_request: {}

env:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
make build-dev
env:
RUST_BACKTRACE: 1
RUSTFLAGS: '-C instrument-coverage'
RUSTFLAGS: "-C instrument-coverage"

- run: uv pip freeze

Expand All @@ -63,17 +63,17 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
- '3.14t'
- 'pypy3.10'
- 'pypy3.11'
- 'graalpy-3.11'
- 'graalpy-3.12'
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "pypy3.10"
- "pypy3.11"
- "graalpy-3.11"
- "graalpy-3.12"

runs-on: ubuntu-latest

Expand Down Expand Up @@ -189,8 +189,8 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.13'
- 'pypy3.10'
- "3.13"
- "pypy3.10"

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
# used to lint js code
- uses: actions/setup-node@v5
with:
node-version: '18'
node-version: "18"

- name: install uv
uses: astral-sh/setup-uv@v6
Expand Down Expand Up @@ -306,7 +306,7 @@ jobs:

- uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: "3.13"

- run: pip install typing_extensions

Expand All @@ -333,7 +333,7 @@ jobs:
# NOTE!: as per https://github.com/pydantic/pydantic-core/pull/149 this version needs to match the version
# in node_modules/pyodide/pyodide-lock.json, to get the version, run:
# `cat node_modules/pyodide/pyodide-lock.json | jq .info.platform`
version: '3.1.58'
version: "3.1.58"
actions-cache-folder: emsdk-cache

- name: install uv
Expand All @@ -347,7 +347,7 @@ jobs:

- uses: actions/setup-node@v5
with:
node-version: '18'
node-version: "18"

- run: npm install

Expand All @@ -365,7 +365,16 @@ jobs:
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
check:
if: always()
needs: [coverage, test-python, test-os, test-debug, lint, bench, build-wasm-emscripten]
needs:
[
coverage,
test-python,
test-os,
test-debug,
lint,
bench,
build-wasm-emscripten,
]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand All @@ -381,7 +390,7 @@ jobs:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: "3.13"
- uses: PyO3/maturin-action@v1
with:
command: sdist
Expand Down Expand Up @@ -480,7 +489,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: "3.13"
architecture: ${{ matrix.python-architecture || 'x64' }}

- run: pip install -U twine 'ruff==0.5.0' typing_extensions
Expand Down Expand Up @@ -511,7 +520,8 @@ jobs:
fail-fast: false
matrix:
os: [linux, windows, macos]
interpreter: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t']
interpreter:
["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
include:
# standard runners with override for macos arm
- os: linux
Expand All @@ -524,7 +534,7 @@ jobs:
exclude:
# macos arm only supported from 3.10 and up
- os: macos
interpreter: '3.9'
interpreter: "3.9"

runs-on: ${{ matrix.runs-on }}
steps:
Expand Down Expand Up @@ -595,8 +605,8 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [aarch64, armv7, s390x, ppc64le]
distro: ['ubuntu22.04']
target: [armv7, s390x, ppc64le]
distro: ["ubuntu22.04"]
include:
- target: aarch64
distro: alpine_latest
Expand Down Expand Up @@ -640,15 +650,22 @@ jobs:
uv run --no-sync python -c 'import pydantic_core._pydantic_core; print(pydantic_core._pydantic_core.__version__)'

test-builds-os:
name: test build on ${{ matrix.os }}
name: test build on ${{ matrix.platform.os }}
needs: [build, build-pgo]

strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]

runs-on: ${{ matrix.os }}-latest
platform:
[
{ os: linux, runs-on: ubuntu-latest },
{ os: linux_aarch64, runs-on: ubuntu-24.04-arm },
{ os: windows, runs-on: windows-latest },
{ os: windows_aarch64, runs-on: windows-11-arm },
{ os: macos, runs-on: macos-latest },
]

runs-on: ${{ matrix.platform.runs-on }}
steps:
- uses: actions/checkout@v5

Expand Down
6 changes: 6 additions & 0 deletions tests/test_hypothesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def url_validator():


@given(strategies.text())
@pytest.mark.timeout(
300 # this is very slow on emulated alpine aarch64, https://github.com/pydantic/pydantic-core/pull/1821
)
@pytest.mark.thread_unsafe # https://github.com/Quansight-Labs/pytest-run-parallel/issues/20
def test_urls_text(url_validator, text):
try:
Expand All @@ -167,6 +170,9 @@ def multi_host_url_validator():


@given(strategies.text())
@pytest.mark.timeout(
300 # this is very slow on emulated alpine aarch64, https://github.com/pydantic/pydantic-core/pull/1821
)
@pytest.mark.thread_unsafe # https://github.com/Quansight-Labs/pytest-run-parallel/issues/20
def test_multi_host_urls_text(multi_host_url_validator, text):
try:
Expand Down
Loading