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
38 changes: 6 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ jobs:
toolchain: stable
- name: Build LibCST
run: hatch -vv env create
- name: Tests
- name: Native Parser Tests
run: hatch run test
- name: Pure Parser Tests
env:
COVERAGE_FILE: .coverage.pure
LIBCST_PARSER_TYPE: pure
run: hatch run test
- name: Coverage
run: |
hatch run coverage combine .coverage.pure
hatch run coverage report

# Run linters
lint:
Expand Down Expand Up @@ -71,37 +76,6 @@ jobs:
run: pip install -U hatch
- run: hatch run typecheck

# Upload test coverage
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: "pyproject.toml"
python-version: "3.10"
- name: Install hatch
run: pip install -U hatch
- name: Generate Coverage
run: |
hatch run coverage run setup.py test
hatch run coverage xml -i
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
fail_ci_if_error: true
verbose: true
- name: Archive Coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml

# Build the docs
docs:
runs-on: ubuntu-latest
Expand Down
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A Concrete Syntax Tree (CST) parser and serializer library for Python

|support-ukraine| |readthedocs-badge| |ci-badge| |codecov-badge| |pypi-badge| |pypi-download| |notebook-badge|
|support-ukraine| |readthedocs-badge| |ci-badge| |pypi-badge| |pypi-download| |notebook-badge|

.. |support-ukraine| image:: https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB
:alt: Support Ukraine - Help Provide Humanitarian Aid to Ukraine.
Expand All @@ -18,10 +18,6 @@ A Concrete Syntax Tree (CST) parser and serializer library for Python
:target: https://github.com/Instagram/LibCST/actions/workflows/build.yml?query=branch%3Amain
:alt: Github Actions

.. |codecov-badge| image:: https://codecov.io/gh/Instagram/LibCST/branch/main/graph/badge.svg
:target: https://codecov.io/gh/Instagram/LibCST/branch/main
:alt: CodeCov

.. |pypi-badge| image:: https://img.shields.io/pypi/v/libcst.svg
:target: https://pypi.org/project/libcst
:alt: PYPI
Expand Down
4 changes: 0 additions & 4 deletions codecov.yml

This file was deleted.

10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = ["pyyaml>=5.2"]
[project.optional-dependencies]
dev = [
"black==23.12.1",
"coverage>=4.5.4",
"coverage[toml]>=4.5.4",
"build>=0.10.0",
"fixit==2.1.0",
"flake8==7.0.0",
Expand Down Expand Up @@ -51,6 +51,12 @@ Changelog = "https://github.com/Instagram/LibCST/blob/main/CHANGELOG.md"
target-version = ["py39"]
extend-exclude = '^/native/' # Prepend "^/" to specify root file/folder. See https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format

[tool.coverage.report]
fail_under = 93
precision = 1
show_missing = true
skip_covered = true

[tool.hatch.envs.default]
features = ["dev"]

Expand All @@ -64,7 +70,7 @@ lint = [
"python -m slotscheck libcst",
"python scripts/check_copyright.py",
]
test = ["python --version", "python -m libcst.tests"]
test = ["python --version", "python -m coverage run -m libcst.tests"]
typecheck = ["pyre --version", "pyre check"]

[tool.slotscheck]
Expand Down
Loading