Skip to content

Commit d9fa054

Browse files
committed
ci: fix test and release workflow
1 parent 7effa90 commit d9fa054

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ jobs:
7676
fail-fast: false
7777
matrix:
7878
os: [ubuntu-latest, macos-latest]
79-
cibw_python:
80-
- "cp38-*"
81-
- "cp39-*"
82-
- "cp310-*"
83-
- "cp311-*"
84-
- "cp312-*"
85-
- "cp313-*"
86-
- "cp314-*"
87-
- "cp314t-*"
79+
python:
80+
- "cp38"
81+
- "cp39"
82+
- "cp310"
83+
- "cp311"
84+
- "cp312"
85+
- "cp313"
86+
- "cp314"
87+
- "cp314t"
8888
cibw_arch: ["x86_64", "aarch64", "universal2"]
8989
exclude:
9090
- os: ubuntu-latest
@@ -119,13 +119,13 @@ jobs:
119119
- uses: pypa/cibuildwheel@7c619efba910c04005a835b110b057fc28fd6e93 # v3.2.0
120120
env:
121121
CIBW_BUILD_VERBOSITY: 1
122-
CIBW_BUILD: ${{ matrix.cibw_python }}
122+
CIBW_BUILD: ${{ matrix.python }}-*
123123
CIBW_ARCHS: ${{ matrix.cibw_arch }}
124124
CIBW_TEST_SKIP: "*universal2:arm64"
125125

126126
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
127127
with:
128-
name: dist-wheels
128+
name: dist-wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.cibw_arch }}
129129
path: wheelhouse/*.whl
130130

131131
publish:

tests/test_dns.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ def _test_getaddrinfo(self, *args, _patch=False, _sorted=False, **kwargs):
5454

5555
if _sorted:
5656
if kwargs.get('flags', 0) & socket.AI_CANONNAME and a1 and a2:
57-
af, sk, proto, canon_name1, addr = a1[0]
58-
a1[0] = (af, sk, proto, '', addr)
59-
af, sk, proto, canon_name2, addr = a2[0]
60-
a2[0] = (af, sk, proto, '', addr)
61-
self.assertEqual(canon_name1, canon_name2)
57+
# The API doesn't guarantee the ai_canonname value if
58+
# multiple results are returned, but both implementations
59+
# must return the same value for the first result.
60+
self.assertEqual(a1[0][3], a2[0][3])
61+
a1 = [(af, sk, pr, addr) for af, sk, pr, _, addr in a1]
62+
a2 = [(af, sk, pr, addr) for af, sk, pr, _, addr in a2]
6263

6364
self.assertEqual(sorted(a1), sorted(a2))
6465
else:

0 commit comments

Comments
 (0)