Repository navigation
73 lines (68 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
73 lines (68 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
quality:
name: Python ${{ matrix.python }} / ${{ matrix.dependencies }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python: "3.10"
dependencies: lowest-direct
- python: "3.14"
dependencies: newest-allowed
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install lowest direct dependency bounds
if: matrix.dependencies == 'lowest-direct'
run: |
python -m pip install --upgrade pip
python -m pip install \
'jsonschema==4.20.0' \
'mcp==2.1.1' \
'pydantic==2.12.0' \
-e '.[dev]'
python - <<'PY'
from importlib.metadata import version
assert version("jsonschema") == "4.20.0"
assert version("mcp") == "2.1.1"
assert version("pydantic") == "2.12.0"
PY
- name: Install newest allowed dependency resolution
if: matrix.dependencies == 'newest-allowed'
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager -e '.[dev]'
- run: python -m ruff check .
- run: python -m ruff format --check .
- run: python -m mypy src tests
- run: python -m pytest -q
artifacts:
name: Build and verify distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
cache: pip
- run: python -m pip install --upgrade pip 'build>=1.3,<2' 'twine>=6.1,<7'
- run: python -m build
- run: python -m twine check dist/*
- run: bash scripts/prepare-wheelhouse.sh wheelhouse
- run: bash scripts/verify-artifacts.sh dist wheelhouse
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: distributions-${{ github.sha }}
path: dist/
if-no-files-found: error
retention-days: 7