Skip to content

Commit 613099e

Browse files
committed
Pin runner images to avoid CI rot
ref https://github.com/MagicStack/asyncpg/actions/runs/22286259051/job/64465189709?pr=1308 failed with: ====================================================================== ERROR: test_tls_version (test_connect.TestSSLConnection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/runner/work/asyncpg/asyncpg/asyncpg/_testbase/__init__.py", line 92, in wrapper self.loop.run_until_complete(coro) File "/Applications/Xcode_16.4.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/Users/runner/work/asyncpg/asyncpg/tests/test_connect.py", line 2024, in test_tls_version await self.connect( File "/Users/runner/work/asyncpg/asyncpg/asyncpg/connection.py", line 2443, in connect return await connect_utils._connect( File "/Users/runner/work/asyncpg/asyncpg/asyncpg/connect_utils.py", line 1209, in _connect addrs, params, config = _parse_connect_arguments(**kwargs) File "/Users/runner/work/asyncpg/asyncpg/asyncpg/connect_utils.py", line 893, in _parse_connect_arguments addrs, params = _parse_connect_dsn_and_args( File "/Users/runner/work/asyncpg/asyncpg/asyncpg/connect_utils.py", line 798, in _parse_connect_dsn_and_args ssl.minimum_version = _parse_tls_version( File "/Applications/Xcode_16.4.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ssl.py", line 586, in minimum_version super(SSLContext, SSLContext).minimum_version.__set__(self, value) ValueError: Unsupported protocol version 0x304
1 parent 3bca715 commit 613099e

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
validate-release-request:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
steps:
1616
- name: Validate release PR
1717
uses: edgedb/action-release/validate-pr@master
@@ -44,7 +44,7 @@ jobs:
4444

4545
build-sdist:
4646
needs: validate-release-request
47-
runs-on: ubuntu-latest
47+
runs-on: ubuntu-24.04
4848

4949
env:
5050
PIP_DISABLE_PIP_VERSION_CHECK: 1
@@ -73,7 +73,7 @@ jobs:
7373

7474
build-wheels-matrix:
7575
needs: validate-release-request
76-
runs-on: ubuntu-latest
76+
runs-on: ubuntu-24.04
7777
outputs:
7878
include: ${{ steps.set-matrix.outputs.include }}
7979
steps:
@@ -141,7 +141,7 @@ jobs:
141141
path: wheelhouse/*.whl
142142

143143
merge-artifacts:
144-
runs-on: ubuntu-latest
144+
runs-on: ubuntu-24.04
145145
needs: [build-sdist, build-wheels]
146146
steps:
147147
- name: Merge Artifacts
@@ -152,7 +152,7 @@ jobs:
152152

153153
publish-docs:
154154
needs: [build-sdist, build-wheels]
155-
runs-on: ubuntu-latest
155+
runs-on: ubuntu-24.04
156156

157157
env:
158158
PIP_DISABLE_PIP_VERSION_CHECK: 1
@@ -201,7 +201,7 @@ jobs:
201201

202202
publish:
203203
needs: [build-sdist, build-wheels, publish-docs]
204-
runs-on: ubuntu-latest
204+
runs-on: ubuntu-24.04
205205

206206
environment:
207207
name: pypi

.github/workflows/tests.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ jobs:
2222
strategy:
2323
matrix:
2424
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
25-
os: [ubuntu-latest, macos-latest, windows-latest]
25+
os: [ubuntu-24.04, macos-15, windows-2025]
2626
loop: [asyncio, uvloop]
2727
exclude:
2828
# uvloop does not support windows
2929
- loop: uvloop
30-
os: windows-latest
30+
os: windows-2025
31+
# github does not provide 3.9 cpython for arm64 runners
32+
- python-version: "3.9"
33+
os: macos-15
3134

3235
runs-on: ${{ matrix.os }}
3336

@@ -54,13 +57,17 @@ jobs:
5457
version_line_pattern: |
5558
__version__(?:\s*:\s*typing\.Final)?\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
5659
57-
- name: Setup PostgreSQL
58-
if: "!steps.release.outputs.is_release && matrix.os == 'macos-latest'"
60+
- name: Set up PostgreSQL
61+
if: "!steps.release.outputs.is_release && startsWith(matrix.os, 'macos')"
5962
run: |
6063
POSTGRES_FORMULA="postgresql@18"
6164
brew install "$POSTGRES_FORMULA"
6265
echo "$(brew --prefix "$POSTGRES_FORMULA")/bin" >> $GITHUB_PATH
6366
67+
- name: Set up Kerberos
68+
if: "!steps.release.outputs.is_release && startsWith(matrix.os, 'ubuntu')"
69+
run: .github/workflows/install-krb5.sh
70+
6471
- name: Set up Python ${{ matrix.python-version }}
6572
uses: astral-sh/setup-uv@v7
6673
if: "!steps.release.outputs.is_release"
@@ -71,26 +78,20 @@ jobs:
7178
- name: Install Python Deps
7279
if: "!steps.release.outputs.is_release"
7380
run: |
74-
[ "$RUNNER_OS" = "Linux" ] && .github/workflows/install-krb5.sh
7581
uv pip install -e . --group test
7682
7783
- name: Test
7884
if: "!steps.release.outputs.is_release"
7985
env:
80-
LOOP_IMPL: ${{ matrix.loop }}
81-
run: |
82-
if [ "${LOOP_IMPL}" = "uvloop" ]; then
83-
env USE_UVLOOP=1 python -m unittest -v tests.suite
84-
else
85-
python -m unittest -v tests.suite
86-
fi
86+
USE_UVLOOP: ${{ matrix.loop == 'uvloop' && '1' || '' }}
87+
run: python -m unittest -v tests.suite
8788

8889
test-postgres:
8990
strategy:
9091
matrix:
9192
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
9293

93-
runs-on: ubuntu-latest
94+
runs-on: ubuntu-24.04
9495

9596
permissions: {}
9697

@@ -122,6 +123,10 @@ jobs:
122123
echo PGINSTALLATION="/usr/lib/postgresql/${PGVERSION}/bin" \
123124
>> "${GITHUB_ENV}"
124125
126+
- name: Set up Kerberos
127+
if: "!steps.release.outputs.is_release"
128+
run: .github/workflows/install-krb5.sh
129+
125130
- name: Set up Python
126131
uses: astral-sh/setup-uv@v7
127132
if: "!steps.release.outputs.is_release"
@@ -131,7 +136,6 @@ jobs:
131136
- name: Install Python Deps
132137
if: "!steps.release.outputs.is_release"
133138
run: |
134-
[ "$RUNNER_OS" = "Linux" ] && .github/workflows/install-krb5.sh
135139
uv pip install -e . --group test
136140
137141
- name: Test
@@ -146,7 +150,7 @@ jobs:
146150
regression-tests:
147151
name: "Regression Tests"
148152
needs: [test-platforms, test-postgres]
149-
runs-on: ubuntu-latest
153+
runs-on: ubuntu-24.04
150154
permissions: {}
151155

152156
steps:

0 commit comments

Comments
 (0)