Skip to content
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

feat: add python 3.12 support #258

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 27 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [master]
pull_request:
branches:
- "**"
- "**"

jobs:
run_tests:
Expand All @@ -14,38 +14,35 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.8"]
toxenv:
[
py38-django32-drf312,
py38-django32-drflatest,
py38-django42-drflatest,
quality,
]
python-version:
- "3.8"
- '3.12'
toxenv: [py38-django32-drf312, py38-django32-drflatest, py38-django42-drflatest,
quality, django42]

steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install pip
run: pip install -r requirements/pip.txt

- name: Install Dependencies
run: |
pip install -r requirements/ci.txt
pip install -r requirements/quality.txt
- name: Install Dependencies
run: |
pip install -r requirements/ci.txt
pip install -r requirements/quality.txt

- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='py38-django42-drflatest'
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: true
- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='py38-django42-drflatest'
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: true
28 changes: 13 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
[tox]
envlist =
py38-django{32}-drf{312, latest}
py38-django{42}-drf{latest} # Django 4.2 is not supported by DRF < 3.14
envlist =
py{38, 312}-django{42}-drf{latest} # Django 4.2 is not supported by DRF < 3.14
quality

[pytest]
DJANGO_SETTINGS_MODULE = test_settings
django_settings_module = test_settings
addopts = --cov edx_api_doc_tools --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements

[testenv]
deps =
django32: Django>=3.2,<4.0
deps =
django42: Django>=4.2,<4.3
drf312: djangorestframework>=3.13,<3.14
drflatest: djangorestframework
-r{toxinidir}/requirements/test.txt
commands =
commands =
pytest {posargs}

[testenv:docs]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
allowlist_externals =
allowlist_externals =
make
rm
deps =
deps =
-r{toxinidir}/requirements/doc.txt
commands =
commands =
make build_docs

[testenv:quality]
setenv =
setenv =
PYTHONPATH = {toxinidir}
allowlist_externals =
allowlist_externals =
make
rm
deps =
deps =
-r{toxinidir}/requirements/quality.txt
commands =
commands =
make quality

Loading