Skip to content

Commit

Permalink
add parallelization and reruns to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jun 7, 2024
1 parent 3ad902a commit 0a67319
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
poetry run flake8 podaac
- name: Test and coverage
run: |
poetry run pytest --junitxml=build/reports/pytest.xml --cov=podaac/ --cov-report=xml:build/reports/coverage.xml -m "not aws and not integration" tests/
poetry run pytest -n auto --junitxml=build/reports/pytest.xml --cov=podaac/ --cov-report=xml:build/reports/coverage.xml -m "not aws and not integration" tests/
- name: SonarCloud Scan
id: sonarcloud
uses: sonarsource/sonarcloud-github-action@master
Expand Down
64 changes: 51 additions & 13 deletions poetry.lock

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

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jsonschema = "^4.20.0"
m2r2 = "^0.3.2"
sphinx-rtd-theme = "^2.0.0"

[tool.poetry.group.dev.dependencies]
pytest-xdist = "^3.6.1"
pytest-rerunfailures = "^14.0"

[tool.pytest.ini_options]
junit_family = "xunit2"

Expand Down
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# pytest.ini

[pytest]
addopts = --reruns 3 --reruns-delay 20

0 comments on commit 0a67319

Please sign in to comment.