File tree 4 files changed +27
-9
lines changed
4 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Changes here will be overwritten by Copier
2
- _commit : f8b63c7
2
+ _commit : 33cc159
3
3
_src_path : https://github.com/python-project-templates/base.git
4
4
add_extension : rust
5
5
Original file line number Diff line number Diff line change 77
77
78
78
- name : Checks
79
79
run : make checks
80
- if : ${{ matrix.os == 'ubuntu-latest' }}
80
+ if : matrix.os == 'ubuntu-latest'
81
81
82
82
- name : Build
83
83
run : make build
@@ -88,33 +88,36 @@ jobs:
88
88
- name : Upload test results (Python)
89
89
uses : actions/upload-artifact@v4
90
90
with :
91
- name : pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
92
- path : junit.xml
91
+ name : test-results-${{ matrix.os }}-${{ matrix.python-version }}
92
+ path : |
93
+ **/junit.xml
93
94
if : ${{ always() }}
94
95
95
96
- name : Publish Unit Test Results
96
97
uses : EnricoMi/publish-unit-test-result-action@v2
97
98
with :
98
99
files : |
99
100
**/junit.xml
100
- if : ${{ matrix.os == 'ubuntu-latest' }}
101
+ if : matrix.os == 'ubuntu-latest'
101
102
102
103
- name : Upload coverage
103
104
uses : codecov/codecov-action@v4
105
+ with :
106
+ token : ${{ secrets.CODECOV_TOKEN }}
104
107
105
108
- name : Make dist
106
109
run : |
107
110
make dist-rust
108
111
make dist-py-sdist
109
112
make dist-py-wheel
110
113
make dist-check
111
- if : ${{ matrix.os == 'ubuntu-latest' }}
114
+ if : matrix.os == 'ubuntu-latest'
112
115
113
116
- name : Make dist
114
117
run : |
115
118
make dist-py-wheel
116
119
make dist-check
117
- if : ${{ matrix.os != 'ubuntu-latest' }}
120
+ if : matrix.os != 'ubuntu-latest'
118
121
119
122
- uses : actions/upload-artifact@v4
120
123
with :
Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ annotate: ## run python type annotation checks with mypy
83
83
# ########
84
84
.PHONY : test-py tests-py coverage-py
85
85
test-py : # # run python tests
86
- python -m pytest -v rust_template/tests --junitxml=junit.xml
86
+ python -m pytest -v rust_template/tests
87
87
88
88
# alias
89
89
tests-py : test-py
90
90
91
91
coverage-py : # # run python tests and collect test coverage
92
- python -m pytest -v rust_template/tests --junitxml=junit.xml -- cov=rust_template --cov-branch --cov-fail-under=50 --cov-report term-missing --cov-report xml
92
+ python -m pytest -v rust_template/tests --cov=rust_template --cov-report term-missing --cov-report xml
93
93
94
94
.PHONY : test-rust tests-rust coverage-rust
95
95
test-rust : # # run rust tests
Original file line number Diff line number Diff line change @@ -100,7 +100,22 @@ archs = "x86_64 arm64"
100
100
environment = {PATH =" $UserProfile\\ .cargo\b in;$PATH" }
101
101
archs = " AMD64 x86"
102
102
103
+ [tool .coverage .run ]
104
+ branch = true
105
+ omit = [
106
+ " rust_template/tests/integration/" ,
107
+ ]
108
+ [tool .coverage .report ]
109
+ exclude_also = [
110
+ " raise NotImplementedError" ,
111
+ " if __name__ == .__main__.:" ,
112
+ " @(abc\\ .)?abstractmethod" ,
113
+ ]
114
+ ignore_errors = true
115
+ fail_under = 50
116
+
103
117
[tool .pytest .ini_options ]
118
+ addopts = [" -vvv" , " --junitxml=junit.xml" ]
104
119
asyncio_mode = " strict"
105
120
testpaths = " rust_template/tests"
106
121
You can’t perform that action at this time.
0 commit comments