Skip to content

Commit

Permalink
ci: parallelize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KSmanis committed Oct 31, 2023
1 parent 51eb8f5 commit eed3ffc
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Install root package
run: poetry install --no-interaction --only-root -v
- name: Run pytest
run: poetry run pytest --color=yes --cov-config=pyproject.toml --with-functional
run: poetry run pytest --color=yes --cov-config=pyproject.toml --numprocesses=8 --with-functional
- name: Upload coverage report
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
- name: Run SonarCloud scanner
Expand Down
36 changes: 35 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ python-semantic-release = "^8.3.0"
[tool.poetry.group.test.dependencies]
pip-tools = "^7.3.0"
pytest-cov = "^4.1.0"
pytest-xdist = "^3.3.1"

[tool.poetry.scripts]
pip-autocompile = "pipautocompile.main:cli"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ def test_working_tree_bare(tmp_path: Path) -> None:
argvalues=(
(
"git_repo_factory",
{"."},
["."],
),
(
"git_superproject_factory",
{"superproject", "submodule", "superproject/submodule"},
["superproject", "submodule", "superproject/submodule"],
),
),
ids=lambda argvalue: repr(argvalue),
Expand All @@ -39,7 +39,7 @@ def test_working_tree(
request: pytest.FixtureRequest,
tmp_path: Path,
repo_factory_fixture: str,
working_trees: set[str],
working_trees: list[str],
) -> None:
repo_factory = request.getfixturevalue(repo_factory_fixture)
repo_factory(tmp_path)
Expand Down

0 comments on commit eed3ffc

Please sign in to comment.