-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple django and python versions from other dependencies #459
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.10", "3.11"] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
|
@@ -28,26 +28,29 @@ jobs: | |
run: tox | ||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-results | ||
name: coverage-results-${{ matrix.python-version }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The coverage results are supposed to be a single combined coverage report. I haven't actually checked if the outputs are being gathered correctly across all branches on github, but it is in tox. |
||
path: .coverage.* | ||
|
||
coverage: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.12'] | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- uses: actions/checkout@v3 | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install coverage | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage-results | ||
name: coverage-results-${{ matrix.python-version }} | ||
- name: Coverage check | ||
run: | | ||
coverage combine | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,11 @@ | |
distribute = False | ||
envlist = | ||
coverage_setup | ||
# Latest | ||
py311-latest{-pyuca,-noi18n} | ||
# Historical Python, Django and DRF versions | ||
py310-previous | ||
# Legacy | ||
py37-legacy | ||
# Package checks | ||
# Currently supported django/python combinations | ||
# https://www.djangoproject.com/download/#supported-versions | ||
py{38,39}-django{32}-{legacy,previous,latest} | ||
py{38,39,310,311,312}-django{42}-{latest} | ||
py{310,311,312}-django{50}-{latest}{-pyuca,-noi18n} | ||
readme | ||
bandit | ||
mypy | ||
|
@@ -18,9 +16,11 @@ ignore_basepython_conflict = True | |
|
||
[gh-actions] | ||
python = | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311, readme, bandit, mypy | ||
3.11: py311 | ||
3.12: py312, readme, bandit, mypy | ||
|
||
[testenv] | ||
basepython = python3 | ||
|
@@ -30,14 +30,14 @@ setenv = | |
DJANGO_SETTINGS_MODULE = django_countries.tests.settings | ||
deps = | ||
coverage | ||
django32: Django>=3.2,<4.0 | ||
django42: Django>=4.2,<4.3 | ||
django50: Django>=5.0,<5.1 | ||
legacy: djangorestframework==3.11.* | ||
previous: djangorestframework==3.14.* | ||
latest: djangorestframework==3.15.* | ||
pyuca,legacy: pyuca | ||
legacy: Django==3.2.* | ||
previous: Django==4.2.* | ||
latest: Django==5.* | ||
latest: graphene-django==3.0.* | ||
latest: graphene-django==3.2.* | ||
depends = coverage_setup | ||
commands = coverage run -m pytest {posargs} | ||
|
||
|
@@ -50,7 +50,7 @@ commands = | |
rst2html.py --report=info --halt=warning README.rst /dev/null | ||
rst2html.py --report=info --halt=warning CHANGES.rst /dev/null | ||
|
||
[py311-latest-noi18n] | ||
[py311-django50-latest-noi18n] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this section can be removed and just use a conditional setenv in the standard section:
|
||
setenv = | ||
DJANGO_SETTINGS_MODULE = django_countries.tests.settings_noi18n | ||
|
||
|
@@ -73,9 +73,9 @@ commands = coverage erase | |
skip_install = True | ||
parallel_show_output = True | ||
depends = | ||
py311-latest{-pyuca,-noi18n} | ||
py310-previous | ||
py37-legacy | ||
py312-django50-latest{-pyuca,-noi18n} | ||
py311-django42-latest | ||
py39-django32-latest | ||
Comment on lines
+76
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These depends have to match the ones in envlist. A comment in envlist would be useful to ensure these are kept up to date when someone next updates them too. |
||
commands = | ||
coverage combine | ||
coverage html | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably speed things up with
tox --parallel