Skip to content

Commit a4203e5

Browse files
authored
Drop codecov from CI and readme (#1192)
* Drop codecov from CI and readme * Remove upload job, move coverage check to test job with hatch
1 parent 52a5947 commit a4203e5

File tree

4 files changed

+15
-43
lines changed

4 files changed

+15
-43
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ jobs:
3131
toolchain: stable
3232
- name: Build LibCST
3333
run: hatch -vv env create
34-
- name: Tests
34+
- name: Native Parser Tests
3535
run: hatch run test
3636
- name: Pure Parser Tests
3737
env:
38+
COVERAGE_FILE: .coverage.pure
3839
LIBCST_PARSER_TYPE: pure
3940
run: hatch run test
41+
- name: Coverage
42+
run: |
43+
hatch run coverage combine .coverage.pure
44+
hatch run coverage report
4045
4146
# Run linters
4247
lint:
@@ -71,37 +76,6 @@ jobs:
7176
run: pip install -U hatch
7277
- run: hatch run typecheck
7378

74-
# Upload test coverage
75-
coverage:
76-
runs-on: ubuntu-latest
77-
steps:
78-
- uses: actions/checkout@v4
79-
with:
80-
fetch-depth: 0
81-
- uses: actions/setup-python@v5
82-
with:
83-
cache: pip
84-
cache-dependency-path: "pyproject.toml"
85-
python-version: "3.10"
86-
- name: Install hatch
87-
run: pip install -U hatch
88-
- name: Generate Coverage
89-
run: |
90-
hatch run coverage run setup.py test
91-
hatch run coverage xml -i
92-
- uses: codecov/codecov-action@v4
93-
env:
94-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
95-
with:
96-
files: coverage.xml
97-
fail_ci_if_error: true
98-
verbose: true
99-
- name: Archive Coverage
100-
uses: actions/upload-artifact@v4
101-
with:
102-
name: coverage
103-
path: coverage.xml
104-
10579
# Build the docs
10680
docs:
10781
runs-on: ubuntu-latest

README.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

7-
|support-ukraine| |readthedocs-badge| |ci-badge| |codecov-badge| |pypi-badge| |pypi-download| |notebook-badge|
7+
|support-ukraine| |readthedocs-badge| |ci-badge| |pypi-badge| |pypi-download| |notebook-badge|
88

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

21-
.. |codecov-badge| image:: https://codecov.io/gh/Instagram/LibCST/branch/main/graph/badge.svg
22-
:target: https://codecov.io/gh/Instagram/LibCST/branch/main
23-
:alt: CodeCov
24-
2521
.. |pypi-badge| image:: https://img.shields.io/pypi/v/libcst.svg
2622
:target: https://pypi.org/project/libcst
2723
:alt: PYPI

codecov.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = ["pyyaml>=5.2"]
2121
[project.optional-dependencies]
2222
dev = [
2323
"black==23.12.1",
24-
"coverage>=4.5.4",
24+
"coverage[toml]>=4.5.4",
2525
"build>=0.10.0",
2626
"fixit==2.1.0",
2727
"flake8==7.0.0",
@@ -51,6 +51,12 @@ Changelog = "https://github.com/Instagram/LibCST/blob/main/CHANGELOG.md"
5151
target-version = ["py39"]
5252
extend-exclude = '^/native/' # Prepend "^/" to specify root file/folder. See https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format
5353

54+
[tool.coverage.report]
55+
fail_under = 93
56+
precision = 1
57+
show_missing = true
58+
skip_covered = true
59+
5460
[tool.hatch.envs.default]
5561
features = ["dev"]
5662

@@ -64,7 +70,7 @@ lint = [
6470
"python -m slotscheck libcst",
6571
"python scripts/check_copyright.py",
6672
]
67-
test = ["python --version", "python -m libcst.tests"]
73+
test = ["python --version", "python -m coverage run -m libcst.tests"]
6874
typecheck = ["pyre --version", "pyre check"]
6975

7076
[tool.slotscheck]

0 commit comments

Comments
 (0)