diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index 0580d8bae..3d3fcd490 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -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 @@ -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 @@ -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 diff --git a/tests/test_report_demo.py b/tests/test_report_demo.py new file mode 100644 index 000000000..e7df78dcd --- /dev/null +++ b/tests/test_report_demo.py @@ -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"