summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÜlgen Sarıkavak <ulgensrkvk@gmail.com>2025-07-22 05:10:16 +0300
committerSaptak Sengupta <saptak013@gmail.com>2025-08-20 12:12:43 +0530
commit33cbad9d052d2637e6d3407dba612cedc466dc77 (patch)
treea8f33fe8cf096e95ca5a96d3eb1557082eea60bf
parent5e0ec824957d1970510e90c74f3bb52bac150b8e (diff)
Remove tox
Resolves #1817 Resolves #1890
-rw-r--r--.coveragerc2
-rw-r--r--.github/workflows/tests.yml20
-rw-r--r--.gitignore1
-rw-r--r--.pre-commit-config.yaml4
-rw-r--r--README.rst8
-rw-r--r--requirements/tests.txt1
-rw-r--r--setup.cfg4
-rw-r--r--tox.ini15
8 files changed, 14 insertions, 41 deletions
diff --git a/.coveragerc b/.coveragerc
index 30d2e5a5..012c579b 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -2,4 +2,4 @@
branch = 1
[report]
-omit = .tox*,*tests*,*migrations*
+omit = *tests*,*migrations*
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 7cbef817..a202574f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -7,15 +7,12 @@ on:
- main
pull_request:
+env:
+ PYTHON_VERSION: 3.12
+
jobs:
tests:
runs-on: ubuntu-24.04
- strategy:
- fail-fast: false
- matrix:
- # tox-gh-actions will only run the tox environments which match the currently
- # running python-version. See [gh-actions] in tox.ini for the mapping.
- python-version: ["3.12"]
services:
postgres:
@@ -35,10 +32,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: "${{ matrix.python-version }}"
+ python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
- python -m pip install --upgrade pip setuptools coveralls "tox<5" "tox-gh-actions<4"
+ python -m pip install --upgrade pip setuptools coveralls
+ python -m pip install -r requirements/tests.txt
- name: Set up databases
run: |
PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost
@@ -59,14 +57,14 @@ jobs:
echo '"trac_db_host": "localhost", ' >> conf/secrets.json
echo '"trac_db_password": "secret", ' >> conf/secrets.json
echo '"secret_key": "a"}' >> conf/secrets.json
- - name: Run tox
+ - name: Run tests
run: |
- python -m tox
+ make ci
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
- COVERALLS_FLAG_NAME: "${{ matrix.python-version }}"
+ COVERALLS_FLAG_NAME: "${{ env.PYTHON_VERSION }}"
COVERALLS_SERVICE_NAME: github
COVERALLS_SERVICE_JOB_ID: "${{ github.run_id }}"
COVERALLS_SERVICE_NUMBER: "${{ github.workflow }}-${{ github.run_number }}"
diff --git a/.gitignore b/.gitignore
index 005ef51d..bb11a2c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,6 @@ locale/*/LC_MESSAGES/django.mo
.coverage
.direnv
.envrc
-.tox
djangoproject/cache
djangoproject/static/css/*.map
djangoproject/static/css/*.css
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 600c12bb..ce966f6b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -61,10 +61,6 @@ repos:
hooks:
- id: djhtml
files: .*/templates/.*\.html$
- - repo: https://github.com/tox-dev/pyproject-fmt
- rev: "v2.6.0"
- hooks:
- - id: pyproject-fmt
- repo: https://github.com/mrtazz/checkmake.git
rev: 0.2.2
hooks:
diff --git a/README.rst b/README.rst
index ba77c427..f547d6e5 100644
--- a/README.rst
+++ b/README.rst
@@ -130,16 +130,13 @@ Our test results can be found here:
* https://github.com/django/djangoproject.com/actions
-For local development don't hesitate to install
-`tox <https://tox.readthedocs.io/>`_ to run the website's test suite.
-
Then in the root directory (next to the ``manage.py`` file) run::
- tox
+ make test
Behind the scenes, this will run the usual ``python -m manage test`` management
command with a preset list of apps that we want to test. We
-collect test coverage data as part of that tox run, to show the result
+collect test coverage data as part of that test run, to show the result
simply run::
python -m coverage report
@@ -364,7 +361,6 @@ Running Locally with Docker
4. Run the tests::
- docker compose run --rm web tox
docker compose run --rm web python -m manage test
Pre-commit checks
diff --git a/requirements/tests.txt b/requirements/tests.txt
index 15e9d284..6da0c6fa 100644
--- a/requirements/tests.txt
+++ b/requirements/tests.txt
@@ -2,4 +2,3 @@
coverage==7.10.4
requests-mock==1.12.1
tblib>=3.0.0
-tox<5.0.0
diff --git a/setup.cfg b/setup.cfg
index a384033f..a2751787 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[flake8]
-exclude = djangodocs,.tox,*/migrations/*,.direnv,.venv
+exclude = djangodocs,*/migrations/*,.direnv,.venv
ignore = F405,W504,W503
# black enforces an 88 char line length but in some edge cases it's unable to
# do so, and in that case it creates an unresolvable E501 error. The solution
@@ -11,7 +11,7 @@ per-file-ignores =
[isort]
line_length = 88
profile = black
-skip = .tox,djangodocs,.direnv,.venv
+skip = djangodocs,.direnv,.venv
known_first_party = accounts,aggregator,blog,contact,dashboard,djangoproject,docs,foundation,fundraising,legacy,members,releases,svntogit,tracdb
combine_as_imports = true
include_trailing_comma = true
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index 62ae04e5..00000000
--- a/tox.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[tox]
-envlist =py{312}-{tests}
-skipsdist = true
-
-[gh-actions]
-python =
- 3.12: py312
-
-[testenv]
-allowlist_externals = make
-passenv = DJANGO_SETTINGS_MODULE
-deps =
- tests: -r{toxinidir}/requirements/tests.txt
-commands =
- tests: make ci