Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
branch = 1

[report]
omit = .tox*,*tests*,*migrations*
omit = *tests*,*migrations*
20 changes: 9 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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 }}"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ locale/*/LC_MESSAGES/django.mo
.coverage
.direnv
.envrc
.tox
djangoproject/cache
djangoproject/static/css/*.map
djangoproject/static/css/*.css
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
coverage==7.10.2
requests-mock==1.12.1
tblib>=3.0.0
tox<5.0.0
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
15 changes: 0 additions & 15 deletions tox.ini

This file was deleted.