Skip to content

Commit d0320d9

Browse files
committed
fixes CI matrix
1 parent d478951 commit d0320d9

File tree

4 files changed

+20
-128
lines changed

4 files changed

+20
-128
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
django: [ "5.1", "4.2", "3.2" ]
44-
python: [ "3.13", "3.12", "3.9" ]
43+
django: [ "51", "42" ]
44+
python: [ "3.13", "3.12" ]
4545
exclude:
4646
- python: 39
4747
django: 51
@@ -73,32 +73,27 @@ jobs:
7373
run: uv python install --python-preference only-managed ${{ matrix.python }}
7474

7575
- name: Setup test suite
76-
run: tox run -vv --notest --skip-missing-interpreters false
76+
run: tox run -vv --notest --skip-missing-interpreters false -e d${{ matrix.django }}-py$(echo ${{ matrix.python }} | sed 's/\.//')
7777

7878
- name: Run test suite d${{ matrix.django }}-py${{ matrix.python }}
79-
run: |
80-
uv export -q --no-hashes -o requirements.txt
81-
uv pip install -r requirements.txt
82-
uv pip install "django==${{ matrix.django }}.*"
83-
uv run pytest tests/ \
84-
--junit-xml junit-${{ matrix.python }}-${{matrix.django}}.xml \
85-
--cov --cov-report xml
79+
run: tox -e d${{ matrix.django }}-py$(echo ${{ matrix.python }} | sed 's/\.//')
8680

87-
- name: UUpload test results to Codecov
88-
uses: codecov/test-results-action@v1
81+
- name: Upload pytest test results
82+
uses: actions/upload-artifact@v4
8983
with:
90-
env_vars: OS
91-
flags: ${{ matrix.django }} ${{ matrix.python }}
92-
token: ${{ secrets.CODECOV_TOKEN }}
93-
verbose: true
84+
name: pytest-results-${{ matrix.python }}-${{matrix.django}}
85+
path: junit-${{ matrix.python }}-${{matrix.django}}.xml
86+
if: ${{ always() }}
9487

9588
- name: Upload coverage to Codecov
96-
uses: codecov/codecov-action@v5
89+
uses: codecov/codecov-action@v4
90+
if: matrix.python == 3.12
91+
continue-on-error: true
9792
with:
9893
env_vars: OS,PYTHON
9994
fail_ci_if_error: true
100-
files: ./coverage1.xml,./coverage2.xml,!./cache
10195
flags: unittests
102-
name: codecov-umbrella
96+
files: ./coverage.xml
97+
verbose: false
10398
token: ${{ secrets.CODECOV_TOKEN }}
104-
verbose: true
99+
name: codecov-${{env.GITHUB_REF_NAME}}

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ max_supported_python = "3.13"
174174
[tool.pytest.ini_options]
175175
django_find_project = false
176176
norecursedirs = [ "demoapp", ".tox" ]
177-
addopts = "--doctest-modules --echo-attr=django.conf.settings.DATABASES.default.ENGINE --tb=short --reuse-db --capture=no --doctest-glob=adminactions/*.py"
177+
addopts = "--doctest-modules --echo-attr=django.conf.settings.DATABASES.default.ENGINE --tb=short --reuse-db --capture=no --doctest-glob=admin_extra_buttons/*.py"
178178
python_files = "tests/test_*.py tests/**/test_*.py src/*.py"
179179
markers = [
180180
"functional: mark a test as functional",
@@ -188,14 +188,12 @@ testpaths = [
188188

189189
[tool.coverage]
190190
run.source = [
191-
"adminactions",
191+
"admin_extra_buttons",
192192
]
193193
run.dynamic_context = "test_function"
194194
run.branch = true
195195
run.parallel = true
196-
run.omit = [
197-
"**/create_extra_permissions.py",
198-
]
196+
199197
run.plugins = [
200198
"covdefaults",
201199
]

tests/.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ branch = True
33
source = admin_extra_buttons
44
include =
55

6-
omit = admin_extra_buttons/__init__.py
6+
omit = src/admin_extra_buttons/__init__.py
77

88
[report]
99
# Regexes for lines to exclude from consideration

uv.lock

Lines changed: 1 addition & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)