Skip to content
Closed
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
32 changes: 32 additions & 0 deletions .github/workflows/python_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
pytest-fast:
name: Pytest (Fast)
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
contents: read
steps:
# Common steps:
- name: Checkout code
Expand Down Expand Up @@ -65,6 +69,19 @@ jobs:
name: fasttest-coverage
path: htmlcov/

- name: Publish Test Results (dorny)
uses: dorny/test-reporter@v2
if: always()
with:
name: PyAirbyte Test Results (dorny)
path: build/test-results/**/*.xml
reporter: java-junit
fail-on-error: false
list-suites: all
list-tests: all
max-annotations: 50
only-summary: false

- name: Upload logs to GitHub Artifacts
if: failure()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -112,6 +129,21 @@ jobs:
--durations=5 --exitfirst
-m "not requires_creds and not linting and not super_slow and not flaky"

- name: Publish Test Results (mikepenz)
uses: mikepenz/action-junit-report@v5
if: always()
with:
report_paths: 'build/test-results/**/*.xml'
check_name: 'PyAirbyte Test Results (mikepenz)'
fail_on_failure: false
require_tests: true
include_passed: true
detailed_summary: false
check_retries: true
include_time_in_summary: true
verbose_summary: false
comment: true

- name: Print Coverage Report
if: always()
run: poetry run coverage report
Expand Down
8 changes: 8 additions & 0 deletions tests/test_report_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_passing_example():
"""This test should pass to demonstrate successful test reporting."""
assert True


def test_failing_example():
"""This test should fail to demonstrate failure reporting."""
assert False, "This is an intentional failure for test reporting demonstration"

Check failure on line 8 in tests/test_report_demo.py

View workflow job for this annotation

GitHub Actions / PyAirbyte Test Results (mikepenz)

test_report_demo.test_failing_example

AssertionError: This is an intentional failure for test reporting demonstration assert False
Raw output
def test_failing_example():
        """This test should fail to demonstrate failure reporting."""
>       assert False, "This is an intentional failure for test reporting demonstration"
E       AssertionError: This is an intentional failure for test reporting demonstration
E       assert False

tests/test_report_demo.py:8: AssertionError
Loading