Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 49 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,51 @@ jobs:
hatch run coverage combine .coverage.pure
hatch run coverage report

# TODO:
# merge into regular CI once hatch has support for creating environments on
# the free-threaded build: https://github.com/pypa/hatch/issues/1931
free-threaded-tests:
name: "test (${{ matrix.os }}, 3.13t)"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
# TODO: update to tagged release when there is one
- uses: actions/setup-python@9e62be81b28222addecf85e47571213eb7680449
with:
cache: pip
cache-dependency-path: "pyproject.toml"
python-version: '3.13t'
- name: Build LibCST
run: |
# Install build-system.requires dependencies
pip install setuptools setuptools-scm setuptools-rust wheel
# Jupyter is annoying to install on free-threaded Python
pip install -e .[dev-without-jupyter] --no-build-isolation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i just noticed this, would CI still work without --no-build-isolation?

- name: Native Parser Tests
# TODO: remove when native modules declare free-threaded support
env:
PYTHON_GIL: '0'
run: |
python -m coverage run -m libcst.tests
- name: Pure Parser Tests
env:
COVERAGE_FILE: .coverage.pure
LIBCST_PARSER_TYPE: pure
run: |
python -m coverage run -m libcst.tests
- name: Coverage
run: |
python -m coverage combine .coverage.pure
python -m coverage report


# Run linters
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -110,16 +155,18 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.13t"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions/setup-python@v5
# TODO: update to tagged release when there is one
- uses: actions/setup-python@9e62be81b28222addecf85e47571213eb7680449
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: test
uses: actions-rs/cargo@v1
with:
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ dependencies = ["pyyaml>=5.2"]

[project.optional-dependencies]
dev = [
"libcst[dev-without-jupyter]",
"jupyter>=1.0.0",
"nbsphinx>=0.4.2",
]
dev-without-jupyter = [
"black==24.8.0",
"coverage[toml]>=4.5.4",
"build>=0.10.0",
Expand All @@ -30,9 +35,7 @@ dev = [
"Sphinx>=5.1.1",
"hypothesis>=4.36.0",
"hypothesmith>=0.0.4",
"jupyter>=1.0.0",
"maturin>=1.7.0,<1.8",
"nbsphinx>=0.4.2",
"prompt-toolkit>=2.0.9",
"pyre-check==0.9.18; platform_system != 'Windows'",
"setuptools_scm>=6.0.1",
Expand Down
Loading