-
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (142 loc) · 5.31 KB
/
Copy path_checks.yml
File metadata and controls
147 lines (142 loc) · 5.31 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: checks
on:
workflow_call: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: extractions/setup-just@v4
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install 3.11
- run: uv python pin 3.11
- run: just install lint-ci
- run: just adr-check
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: extractions/setup-just@v4
- uses: astral-sh/setup-uv@v8.2.0
- run: just docs-build
links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# --offline blocks network requests and excludes every external URL, so this
# gate is deterministic: it fails only on a relative link or file path that a
# diff actually broke.
# Tag-pinned and cross-repo URLs do not match the --remap pattern and stay
# excluded: they point at trees this checkout does not have.
- name: Check local links
uses: lycheeverse/lychee-action@v2
with:
args: >-
--offline
--no-progress
--remap
'https://github\.com/${{ github.repository }}/(?:blob|tree)/main/(.*) file://${{ github.workspace }}/$1'
'**/*.md'
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: outbox
POSTGRES_PASSWORD: outbox
POSTGRES_DB: outbox
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U outbox"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v6
- uses: extractions/setup-just@v4
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: uv python pin ${{ matrix.python-version }}
- run: just install
- name: Assert the GIL is actually disabled
if: matrix.python-version == '3.14t'
run: uv run --no-sync python -c "import sys, asyncpg, sqlalchemy, pydantic_core, faststream, faststream_outbox; assert not sys._is_gil_enabled(), 'GIL re-enabled - a dependency lacks free-threaded support'"
- run: just test-ci
env:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
POSTGRES_DSN: postgresql+asyncpg://outbox:outbox@127.0.0.1:5432/outbox
floors:
# The declared floors are part of what we ship, and nothing else in CI installs
# them: `pytest` and `scheduled-dep-check` both resolve highest. That is how
# `sqlalchemy[asyncio]>=2.0` stayed declared after 3.13 made it fail at import.
# This leg resolves the lower bound instead, on every supported interpreter:
# a floor's wheel coverage is per-interpreter, so two interpreters resolving
# the same versions can still disagree on whether those versions install.
# 3.14t is out: the dev group's `faststream[kafka]` pulls aiokafka, which ships no cp314t
# wheel, so under --no-build this leg would measure upstream's gap rather than a floor.
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: outbox
POSTGRES_PASSWORD: outbox
POSTGRES_DB: outbox
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U outbox"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: uv python pin ${{ matrix.python-version }}
- run: uv venv
# Pinned with builds allowed, so a floor with no wheel fails the wheel-only install below.
- run: uv pip compile pyproject.toml --all-extras --no-deps --resolution lowest-direct -o floors.txt
- run: uv pip install -r pyproject.toml --all-extras --group dev --constraints floors.txt --no-build
# fastapi's floor pulls a starlette whose TestClient predates httpx2 support.
# Installed here rather than declared in the dev group: at the resolved-highest
# end starlette takes the httpx2 that group already declares, and adding httpx
# there would pin a second client into every other leg to serve this one.
- run: uv pip install httpx
# --no-cov: the coverage gate rides the resolved-highest leg in `test-ci`. This
# one asks whether the floors work, which a coverage failure would only obscure.
- run: uv run --no-sync pytest . --no-cov
env:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
POSTGRES_DSN: postgresql+asyncpg://outbox:outbox@127.0.0.1:5432/outbox