Commit 751a5f9 1 parent 19cef80 commit 751a5f9 Copy full SHA for 751a5f9
File tree 6 files changed +132
-9
lines changed
6 files changed +132
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : " Codecov workflow"
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ push :
7
+ branches :
8
+ - master
9
+
10
+ jobs :
11
+ test :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v3
17
+
18
+ - name : Install Poetry
19
+ run : pip3 install poetry
20
+
21
+ - name : Setup Python
22
+ uses : actions/setup-python@v4
23
+ with :
24
+ python-version : " 3.9"
25
+
26
+ - name : Install dependencies
27
+ run : |
28
+ poetry install
29
+
30
+ - name : Run tests
31
+ run : |
32
+ poetry run gird test
33
+
34
+ - name : Upload coverage reports to Codecov
35
+ uses : codecov/codecov-action@v3
Original file line number Diff line number Diff line change 1
1
.idea
2
2
dist
3
- .gird
4
3
test /benchmark /.cache
5
- test /benchmark /tmp
4
+ test /benchmark /tmp
5
+ .coverage
6
+ coverage.xml
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ WHEEL_PATH = get_wheel_path()
61
61
62
62
RULE_PYTEST = rule(
63
63
target = Phony(" pytest" ),
64
- recipe = " pytest -n auto" ,
65
- help = " Run pytest." ,
64
+ recipe = " pytest -n auto --cov=gird --cov-report=xml " ,
65
+ help = " Run pytest & get code coverage report ." ,
66
66
)
67
67
68
68
RULE_CHECK_FORMATTING = rule(
@@ -120,13 +120,13 @@ Respective output from `gird list`:
120
120
121
121
```
122
122
pytest
123
- Run pytest.
123
+ Run pytest & get code coverage report .
124
124
check_formatting
125
125
Check formatting with Black & isort.
126
126
check_readme_updated
127
127
Check that README.md is updated based on README_template.md.
128
128
test
129
- - Run pytest.
129
+ - Run pytest & get code coverage report .
130
130
- Check formatting with Black & isort.
131
131
- Check that README.md is updated based on README_template.md.
132
132
README.md
Original file line number Diff line number Diff line change 8
8
9
9
RULE_PYTEST = rule (
10
10
target = Phony ("pytest" ),
11
- recipe = "pytest -n auto" ,
12
- help = "Run pytest." ,
11
+ recipe = "pytest -n auto --cov=gird --cov-report=xml " ,
12
+ help = "Run pytest & get code coverage report ." ,
13
13
)
14
14
15
15
RULE_CHECK_FORMATTING = rule (
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ jinja2 = "^3.1.2"
25
25
twine = " ^4.0.2"
26
26
tomli = " ^2.0.1"
27
27
pytest-xdist = " ^3.2.0"
28
+ pytest-cov = " ^4.0.0"
28
29
29
30
[tool .isort ]
30
31
profile = " black"
You can’t perform that action at this time.
0 commit comments