Skip to content

Commit

Permalink
perf: run tests in parallel with pytest-xdist (ci)
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed Aug 11, 2023
1 parent 5324739 commit 65fe8a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
mkdir testing/log
- name: Run Tests
run: |
pytest -p no:cacheprovider --cov --reuse-db
pytest -p no:cacheprovider --cov --reuse-db --numprocesses=auto --dist=loadscope
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env2
env3

.coverage
.coverage.*
htmlcov

build
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ tests = [
"pytest-dotenv~=0.5.2",
"pytest-mock~=3.7.0", # 3.7.0 drops Python 3.6 support, https://pytest-mock.readthedocs.io/en/latest/changelog.html
"pytest-randomly~=3.12.0", # 3.13.0 drops Python 3.7 support, https://github.com/pytest-dev/pytest-randomly/blob/main/CHANGELOG.rst#3120-2022-05-11
"pytest-xdist~=3.3.1",
]
[project.urls]
Changelog = "https://github.com/rdmorganiser/rdmo/blob/master/CHANGELOG.md"
Expand Down
2 changes: 1 addition & 1 deletion rdmo/projects/tests/test_view_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def test_project_view(db, client, username, password, project_id):
@pytest.mark.parametrize('username,password', users)
@pytest.mark.parametrize('project_id', projects)
@pytest.mark.parametrize('export_format', export_formats)
def test_project_view_export(db, client, username, password, project_id, export_format):
def test_project_view_export(db, client, username, password, project_id, export_format, files):
client.login(username=username, password=password)
project_views = Project.objects.get(pk=project_id).views.all()

Expand Down

0 comments on commit 65fe8a1

Please sign in to comment.