diff --git a/.coveragerc b/.coveragerc index 30d2e5a5c..012c579b3 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 7cbef817c..9a9857e38 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,6 @@ on: 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 +29,11 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "${{ matrix.python-version }}" + python-version: 3.12 - 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,9 +54,9 @@ 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 }} diff --git a/.gitignore b/.gitignore index 005ef51df..bb11a2c95 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 600c12bb8..ce966f6b4 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 ba77c4278..f547d6e55 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 `_ 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 94cc982e1..476616f30 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -2,4 +2,3 @@ coverage==7.10.2 requests-mock==1.12.1 tblib>=3.0.0 -tox<5.0.0 diff --git a/setup.cfg b/setup.cfg index a384033f7..a27517872 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 62ae04e58..000000000 --- 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