Skip to content

Commit a9f440f

Browse files
committed
Try using pinned version in a better way
1 parent 6fcb8f0 commit a9f440f

3 files changed

Lines changed: 9 additions & 33 deletions

File tree

.github/workflows/test.yml

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,17 @@ jobs:
106106
os: ubuntu-24.04-arm
107107
toxenv: py
108108
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
109-
dev_ast_serialize: true
110109
- name: Parallel tests with py314-ubuntu, mypyc-compiled
111110
python: '3.14'
112111
os: ubuntu-24.04-arm
113112
toxenv: py
114113
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
115114
test_mypyc: true
116-
dev_ast_serialize: true
117-
# Skip Windows tests until we publish ast_serialize wheels on PyPI.
118-
# - name: Parallel tests with py314-windows-64, interpreted
119-
# python: '3.14'
120-
# os: windows-latest
121-
# toxenv: py
122-
# tox_extra_args: "-n 2 --mypy-num-workers=2 mypy/test/testcheck.py -k 'incremental or modules or classes'"
115+
- name: Parallel tests with py314-windows-64, interpreted
116+
python: '3.14'
117+
os: windows-latest
118+
toxenv: py
119+
tox_extra_args: "-n 2 --mypy-num-workers=2 mypy/test/testcheck.py -k 'incremental or modules or classes'"
123120

124121
- name: Type check our own code (py310-ubuntu)
125122
python: '3.10'
@@ -142,7 +139,6 @@ jobs:
142139
timeout-minutes: 60
143140
env:
144141
TOX_SKIP_MISSING_INTERPRETERS: False
145-
VIRTUALENV_SYSTEM_SITE_PACKAGES: ${{ matrix.dev_ast_serialize && 1 || 0 }}
146142
# Rich (pip) -- Disable color for windows + pytest
147143
FORCE_COLOR: ${{ !(startsWith(matrix.os, 'windows-') && startsWith(matrix.toxenv, 'py')) && 1 || 0 }}
148144
# Tox
@@ -217,30 +213,6 @@ jobs:
217213
pip install -r test-requirements.txt
218214
CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e .
219215
220-
# To speed-up process until ast_serialize is on PyPI.
221-
- name: Checkout pinned ast_serialize
222-
if: ${{ matrix.dev_ast_serialize }}
223-
uses: actions/checkout@v4
224-
with:
225-
persist-credentials: false
226-
repository: mypyc/ast_serialize
227-
ref: da5a16cf268dbec63ed6b2e6b715470576e2d1a6
228-
path: ast_serialize
229-
230-
- if: ${{ matrix.dev_ast_serialize }}
231-
uses: PyO3/maturin-action@v1
232-
with:
233-
target: aarch64
234-
args: --release --out dist
235-
working-directory: ast_serialize
236-
237-
- if: ${{ matrix.dev_ast_serialize }}
238-
run: |
239-
pip install ast_serialize/dist/ast_serialize-0.1.0-cp39-abi3-manylinux_2_34_aarch64.whl
240-
echo 'no way' > test_ast_serialize.py
241-
python3 -c 'import ast_serialize; print(ast_serialize.parse("test_ast_serialize.py")[1])'
242-
rm test_ast_serialize.py
243-
244216
- name: Setup tox environment
245217
run: |
246218
tox run -e ${{ matrix.toxenv }} --notest

test-requirements.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ pytest-cov>=2.10.0
1313
setuptools>=75.1.0
1414
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.10
1515
pre_commit>=3.5.0
16+
# To speed-up process until ast_serialize is on PyPI.
17+
ast-serialize @ git+https://github.com/mypyc/ast_serialize.git@da5a16cf268dbec63ed6b2e6b715470576e2d1a6

test-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# pip-compile --allow-unsafe --output-file=test-requirements.txt --strip-extras test-requirements.in
66
#
7+
ast-serialize @ git+https://github.com/mypyc/ast_serialize.git@da5a16cf268dbec63ed6b2e6b715470576e2d1a6
8+
# via -r test-requirements.in
79
attrs==25.4.0
810
# via -r test-requirements.in
911
cfgv==3.4.0

0 commit comments

Comments
 (0)