File tree Expand file tree Collapse file tree 4 files changed +15
-43
lines changed Expand file tree Collapse file tree 4 files changed +15
-43
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,17 @@ jobs:
31
31
toolchain : stable
32
32
- name : Build LibCST
33
33
run : hatch -vv env create
34
- - name : Tests
34
+ - name : Native Parser Tests
35
35
run : hatch run test
36
36
- name : Pure Parser Tests
37
37
env :
38
+ COVERAGE_FILE : .coverage.pure
38
39
LIBCST_PARSER_TYPE : pure
39
40
run : hatch run test
41
+ - name : Coverage
42
+ run : |
43
+ hatch run coverage combine .coverage.pure
44
+ hatch run coverage report
40
45
41
46
# Run linters
42
47
lint :
71
76
run : pip install -U hatch
72
77
- run : hatch run typecheck
73
78
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
-
105
79
# Build the docs
106
80
docs :
107
81
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 4
4
5
5
A Concrete Syntax Tree (CST) parser and serializer library for Python
6
6
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 |
8
8
9
9
.. |support-ukraine | image :: https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB
10
10
:alt: Support Ukraine - Help Provide Humanitarian Aid to Ukraine.
@@ -18,10 +18,6 @@ A Concrete Syntax Tree (CST) parser and serializer library for Python
18
18
:target: https://github.com/Instagram/LibCST/actions/workflows/build.yml?query=branch%3Amain
19
19
:alt: Github Actions
20
20
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
-
25
21
.. |pypi-badge | image :: https://img.shields.io/pypi/v/libcst.svg
26
22
:target: https://pypi.org/project/libcst
27
23
:alt: PYPI
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ dependencies = ["pyyaml>=5.2"]
21
21
[project .optional-dependencies ]
22
22
dev = [
23
23
" black==23.12.1" ,
24
- " coverage>=4.5.4" ,
24
+ " coverage[toml] >=4.5.4" ,
25
25
" build>=0.10.0" ,
26
26
" fixit==2.1.0" ,
27
27
" flake8==7.0.0" ,
@@ -51,6 +51,12 @@ Changelog = "https://github.com/Instagram/LibCST/blob/main/CHANGELOG.md"
51
51
target-version = [" py39" ]
52
52
extend-exclude = ' ^/native/' # Prepend "^/" to specify root file/folder. See https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format
53
53
54
+ [tool .coverage .report ]
55
+ fail_under = 93
56
+ precision = 1
57
+ show_missing = true
58
+ skip_covered = true
59
+
54
60
[tool .hatch .envs .default ]
55
61
features = [" dev" ]
56
62
@@ -64,7 +70,7 @@ lint = [
64
70
" python -m slotscheck libcst" ,
65
71
" python scripts/check_copyright.py" ,
66
72
]
67
- test = [" python --version" , " python -m libcst.tests" ]
73
+ test = [" python --version" , " python -m coverage run -m libcst.tests" ]
68
74
typecheck = [" pyre --version" , " pyre check" ]
69
75
70
76
[tool .slotscheck ]
You can’t perform that action at this time.
0 commit comments