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
48 changes: 48 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Python Tests

on:
pull_request:

jobs:
run-tests:
name: Run unit tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Run tests
run: ./scripts/run_pytest.sh

- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: |
coverage.xml
htmlcov/
6 changes: 5 additions & 1 deletion tests/test_test_run_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,12 @@ def test_test_run_execution_log_whitespace_content(

# Assert
assert result.exit_code == 0
# Click prepends a DeprecationWarning line for deprecated options; strip it before comparing
output_without_warning = "\n".join(
line for line in result.output.splitlines() if not line.startswith("DeprecationWarning:")
)
# Should still output the whitespace content as-is
assert result.output.strip() == log_content.rstrip()
assert output_without_warning.strip() == log_content.rstrip()

def test_test_run_execution_log_generic_exception(
self,
Expand Down
Loading