Skip to content

Commit db4d6eb

Browse files
authored
Merge pull request #10 from python-project-templates/copier-update-2024-10-11T04-21-53
Update from copier (2024-10-11T04:21:53)
2 parents 9f6568a + a6fbc37 commit db4d6eb

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: f8b63c7
2+
_commit: 33cc159
33
_src_path: https://github.com/python-project-templates/base.git
44
add_extension: rust
55

.github/workflows/build.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777

7878
- name: Checks
7979
run: make checks
80-
if: ${{ matrix.os == 'ubuntu-latest' }}
80+
if: matrix.os == 'ubuntu-latest'
8181

8282
- name: Build
8383
run: make build
@@ -88,33 +88,36 @@ jobs:
8888
- name: Upload test results (Python)
8989
uses: actions/upload-artifact@v4
9090
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
9394
if: ${{ always() }}
9495

9596
- name: Publish Unit Test Results
9697
uses: EnricoMi/publish-unit-test-result-action@v2
9798
with:
9899
files: |
99100
**/junit.xml
100-
if: ${{ matrix.os == 'ubuntu-latest' }}
101+
if: matrix.os == 'ubuntu-latest'
101102

102103
- name: Upload coverage
103104
uses: codecov/codecov-action@v4
105+
with:
106+
token: ${{ secrets.CODECOV_TOKEN }}
104107

105108
- name: Make dist
106109
run: |
107110
make dist-rust
108111
make dist-py-sdist
109112
make dist-py-wheel
110113
make dist-check
111-
if: ${{ matrix.os == 'ubuntu-latest' }}
114+
if: matrix.os == 'ubuntu-latest'
112115

113116
- name: Make dist
114117
run: |
115118
make dist-py-wheel
116119
make dist-check
117-
if: ${{ matrix.os != 'ubuntu-latest' }}
120+
if: matrix.os != 'ubuntu-latest'
118121

119122
- uses: actions/upload-artifact@v4
120123
with:

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ annotate: ## run python type annotation checks with mypy
8383
#########
8484
.PHONY: test-py tests-py coverage-py
8585
test-py: ## run python tests
86-
python -m pytest -v rust_template/tests --junitxml=junit.xml
86+
python -m pytest -v rust_template/tests
8787

8888
# alias
8989
tests-py: test-py
9090

9191
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
9393

9494
.PHONY: test-rust tests-rust coverage-rust
9595
test-rust: ## run rust tests

pyproject.toml

+15
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,22 @@ archs = "x86_64 arm64"
100100
environment = {PATH="$UserProfile\\.cargo\bin;$PATH"}
101101
archs = "AMD64 x86"
102102

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+
103117
[tool.pytest.ini_options]
118+
addopts = ["-vvv", "--junitxml=junit.xml"]
104119
asyncio_mode = "strict"
105120
testpaths = "rust_template/tests"
106121

0 commit comments

Comments
 (0)