1313 fail-fast : false
1414 matrix :
1515 os : [macos-latest, ubuntu-latest, windows-latest]
16- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
16+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t" ]
1717 steps :
18+ - uses : actions/setup-python@v5
19+ with :
20+ python-version : " 3.10"
21+ - name : Install hatch
22+ run : pip install -U hatch
1823 - uses : actions/checkout@v4
1924 with :
2025 fetch-depth : 0
@@ -24,69 +29,22 @@ jobs:
2429 cache : pip
2530 cache-dependency-path : " pyproject.toml"
2631 python-version : ${{ matrix.python-version }}
27- - name : Install hatch
28- run : |
29- pip install -U hatch
3032 - uses : actions-rs/toolchain@v1
3133 with :
3234 toolchain : stable
3335 - name : Build LibCST
34- run : hatch -vv env create
36+ run : hatch -vv env create test
3537 - name : Native Parser Tests
36- run : hatch run test
38+ run : hatch run test:test
3739 - name : Pure Parser Tests
3840 env :
3941 COVERAGE_FILE : .coverage.pure
4042 LIBCST_PARSER_TYPE : pure
41- run : hatch run test
43+ run : hatch run test:test
4244 - name : Coverage
4345 run : |
44- hatch run coverage combine .coverage.pure
45- hatch run coverage report
46-
47- # TODO:
48- # merge into regular CI once hatch has support for creating environments on
49- # the free-threaded build: https://github.com/pypa/hatch/issues/1931
50- free-threaded-tests :
51- name : " test (${{ matrix.os }}, 3.13t)"
52- runs-on : ${{ matrix.os }}
53- strategy :
54- fail-fast : false
55- matrix :
56- os : [macos-latest, ubuntu-latest, windows-latest]
57- steps :
58- - uses : actions/checkout@v4
59- with :
60- fetch-depth : 0
61- persist-credentials : false
62- - uses : actions/setup-python@v5
63- with :
64- cache : pip
65- cache-dependency-path : " pyproject.toml"
66- python-version : ' 3.13t'
67- - name : Build LibCST
68- run : |
69- # Install build-system.requires dependencies
70- pip install setuptools setuptools-scm setuptools-rust wheel
71- # Jupyter is annoying to install on free-threaded Python
72- pip install -e .[dev-without-jupyter]
73- - name : Native Parser Tests
74- # TODO: remove when native modules declare free-threaded support
75- env :
76- PYTHON_GIL : ' 0'
77- run : |
78- python -m coverage run -m libcst.tests
79- - name : Pure Parser Tests
80- env :
81- COVERAGE_FILE : .coverage.pure
82- LIBCST_PARSER_TYPE : pure
83- run : |
84- python -m coverage run -m libcst.tests
85- - name : Coverage
86- run : |
87- python -m coverage combine .coverage.pure
88- python -m coverage report
89-
46+ hatch run test:coverage combine .coverage.pure
47+ hatch run test:coverage report
9048
9149 # Run linters
9250 lint :
13997 - name : Install hatch
14098 run : pip install -U hatch
14199 - uses : ts-graphviz/setup-graphviz@v2
142- - run : hatch run docs
100+ - run : hatch run docs:docs
143101 - name : Archive Docs
144102 uses : actions/upload-artifact@v4
145103 with :
0 commit comments