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 .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
ENV: stage
PRODUCT_ID: ${{ secrets.STAGE_PRODUCT_ID }}

run: python -m pytest -r fE -x --cov-branch --cov=./ --cov-report=lcov:coverage/lcov.info
run: python -m pytest --cov-branch --cov=./ --cov-report=lcov:coverage/lcov.info

- name: Check resources on failure
if: failure()
Expand Down
16 changes: 16 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[pytest]
addopts =
-n auto
--dist loadgroup
--maxfail=5
-rfE

# Options explained:
# -n auto: Run tests in parallel using all CPU cores
# --dist loadgroup: Group related tests together for better parallel execution
# --maxfail=5: Stop after 5 test failures instead of continuing
# -r fE: Show summary of only failures and errors (not passed/skipped)
testpaths = .
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ distro==1.9.0
dnspython==2.6.1
email_validator==2.2.0
exceptiongroup==1.2.2
execnet==2.1.2
Faker==24.14.1
fastapi==0.115.12
fastapi-cli==0.0.5
Expand Down Expand Up @@ -93,6 +94,7 @@ pyright==1.1.405
pytest==8.3.3
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.20
Expand Down
6 changes: 5 additions & 1 deletion services/github/templates/add_issue_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def add_issue_templates(full_name: str, installer_name: str, token: str) -> None
# Get the list of existing files in the user's remote repository at the GITHUB_ISSUE_DIR. We need to use try except as repo.get_contents() raises a 404 error if the directory doesn't exist. Also directory path MUST end without a slash.
try:
remote_files_result = repo.get_contents(path=GITHUB_ISSUE_DIR)
remote_files: list[ContentFile] = remote_files_result if isinstance(remote_files_result, list) else [remote_files_result]
remote_files: list[ContentFile] = (
remote_files_result
if isinstance(remote_files_result, list)
else [remote_files_result]
)
remote_file_names: list[str] = [file.name for file in remote_files]
except Exception: # pylint: disable=broad-except
remote_file_names = []
Expand Down