|
44 | 44 | hatch run coverage combine .coverage.pure
|
45 | 45 | hatch run coverage report
|
46 | 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 | + # TODO: update to tagged release when there is one |
| 63 | + - uses: actions/setup-python@9e62be81b28222addecf85e47571213eb7680449 |
| 64 | + with: |
| 65 | + cache: pip |
| 66 | + cache-dependency-path: "pyproject.toml" |
| 67 | + python-version: '3.13t' |
| 68 | + - name: Build LibCST |
| 69 | + run: | |
| 70 | + # Install build-system.requires dependencies |
| 71 | + pip install setuptools setuptools-scm setuptools-rust wheel |
| 72 | + # Jupyter is annoying to install on free-threaded Python |
| 73 | + pip install -e .[dev-without-jupyter] --no-build-isolation |
| 74 | + - name: Native Parser Tests |
| 75 | + # TODO: remove when native modules declare free-threaded support |
| 76 | + env: |
| 77 | + PYTHON_GIL: '0' |
| 78 | + run: | |
| 79 | + python -m coverage run -m libcst.tests |
| 80 | + - name: Pure Parser Tests |
| 81 | + env: |
| 82 | + COVERAGE_FILE: .coverage.pure |
| 83 | + LIBCST_PARSER_TYPE: pure |
| 84 | + run: | |
| 85 | + python -m coverage run -m libcst.tests |
| 86 | + - name: Coverage |
| 87 | + run: | |
| 88 | + python -m coverage combine .coverage.pure |
| 89 | + python -m coverage report |
| 90 | +
|
| 91 | +
|
47 | 92 | # Run linters
|
48 | 93 | lint:
|
49 | 94 | runs-on: ubuntu-latest
|
@@ -110,16 +155,18 @@ jobs:
|
110 | 155 | fail-fast: false
|
111 | 156 | matrix:
|
112 | 157 | os: [ubuntu-latest, macos-latest, windows-latest]
|
| 158 | + python-version: ["3.10", "3.13t"] |
113 | 159 | steps:
|
114 | 160 | - uses: actions/checkout@v4
|
115 | 161 | with:
|
116 | 162 | persist-credentials: false
|
117 | 163 | - uses: dtolnay/rust-toolchain@stable
|
118 | 164 | with:
|
119 | 165 | components: rustfmt, clippy
|
120 |
| - - uses: actions/setup-python@v5 |
| 166 | + # TODO: update to tagged release when there is one |
| 167 | + - uses: actions/setup-python@9e62be81b28222addecf85e47571213eb7680449 |
121 | 168 | with:
|
122 |
| - python-version: "3.10" |
| 169 | + python-version: ${{ matrix.python-version }} |
123 | 170 | - name: test
|
124 | 171 | uses: actions-rs/cargo@v1
|
125 | 172 | with:
|
|
0 commit comments